summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-24 06:47:55 (GMT)
committerjk7744.park <jk7744.park@samsung.com>2015-10-24 06:47:55 (GMT)
commite035ebce3d97ccfcf2dddf9be9806caa110bb787 (patch)
tree310b2e6b68dac26b32c3c0a7d3767cc69ba80507
parentb54357062800cca296ade4fc82b7b5c13a280ff4 (diff)
downloadwallpaper-ui-service-tizen_2.4.zip
wallpaper-ui-service-tizen_2.4.tar.gz
wallpaper-ui-service-tizen_2.4.tar.bz2
-rwxr-xr-xCMakeLists.txt32
-rwxr-xr-xinclude/wallpaper-ui-service-debug.h (renamed from src/wallpaper-ui-service-debug.h)20
-rwxr-xr-xinclude/wallpaper-ui-service-main.h70
-rwxr-xr-xinclude/wallpaper-ui-service.h (renamed from src/wallpaper-ui-service.h)119
-rwxr-xr-xorg.tizen.wallpaper-ui-service.efl (renamed from org.tizen.wallpaper-ui-service-lite.efl)30
-rwxr-xr-xorg.tizen.wallpaper-ui-service.xml2
-rw-r--r--org.tizen.wallpaper-ui-service_color.xml51
-rw-r--r--org.tizen.wallpaper-ui-service_font.xml30
-rwxr-xr-xpackaging/org.tizen.wallpaper-ui-service.spec40
-rwxr-xr-x[-rw-r--r--]res/resources/CMakeLists.txt12
-rwxr-xr-xres/resources/edje/button_customized_theme.edc519
-rw-r--r--res/resources/edje/color_classes.edc198
-rwxr-xr-xres/resources/edje/cp-wallpaper-main-view.edc529
-rw-r--r--res/resources/edje/gengrid_customized_theme.edc6
-rwxr-xr-xres/resources/edje/mutiple-wallpaper.edc118
-rwxr-xr-xres/resources/edje/popup-color-theme-main-view.edc164
-rw-r--r--res/resources/edje/popup-wallpaper-macro.edc6
-rwxr-xr-xres/resources/edje/popup-wallpaper-main-view.edc2693
-rwxr-xr-x[-rw-r--r--]res/resources/edje/popup-wallpaper.edc11
-rwxr-xr-xres/resources/icons/core_icon_back.pngbin0 -> 1214 bytes
-rwxr-xr-xres/resources/icons/home_wallpapaer_title_bg.#.pngbin0 -> 1435 bytes
-rwxr-xr-xsrc/cp-wallpaper-main.c2276
-rwxr-xr-xsrc/cp-wallpaper-main.h92
-rwxr-xr-xsrc/festival-wallpaper.c581
-rwxr-xr-xsrc/festival-wallpaper.h32
-rwxr-xr-xsrc/popup-color-theme-main.c266
-rwxr-xr-xsrc/popup-color-theme-main.h26
-rwxr-xr-xsrc/popup-wallpaper-main.c1068
-rwxr-xr-xsrc/popup-wallpaper-main.h32
-rwxr-xr-xsrc/wallpaper-ui-service-main.c3994
-rwxr-xr-xsrc/wallpaper-ui-service-main.h89
-rwxr-xr-xsrc/wallpaper-ui-service.c997
32 files changed, 2619 insertions, 11484 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af4d559..3a86a0c 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(wallpaper-ui-service-lite C)
+PROJECT(wallpaper-ui-service C)
IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
SET(CMAKE_BUILD_TYPE "Release")
@@ -15,8 +15,6 @@ SET(RESDIR "${PREFIX}/res")
SET(LOCALEDIR "${RESDIR}/locale")
SET(ICONDIR "${RESDIR}/icons")
SET(EDJDIR "${RESDIR}/edje")
-SET(FESTIVALDIR "${PREFIXRW}/data/wallpaper")
-SET(CHANGEABLEDIR "${PREFIX}/shared/res/tables")
SET(DESKTOPDIR "/usr/share/applications")
SET(MANIFESTXMLDIR "/usr/share/packages")
@@ -24,31 +22,21 @@ SET(MANIFESTXMLDIR "/usr/share/packages")
#SET(SRCS ${MAIN_SRCS})
-IF("${BRANCH}" STREQUAL "PRIVATE")
-SET(SRCS
- ${CMAKE_SOURCE_DIR}/src/cp-wallpaper-main.c
- ${CMAKE_SOURCE_DIR}/src/festival-wallpaper.c
- ${CMAKE_SOURCE_DIR}/src/popup-color-theme-main.c
- ${CMAKE_SOURCE_DIR}/src/popup-wallpaper-main.c
- ${CMAKE_SOURCE_DIR}/src/wallpaper-ui-service-main.c
- ${CMAKE_SOURCE_DIR}/src/wallpaper-ui-service.c
-)
-ELSE()
+
SET(SRCS
- ${CMAKE_SOURCE_DIR}/src/popup-color-theme-main.c
- ${CMAKE_SOURCE_DIR}/src/popup-wallpaper-main.c
${CMAKE_SOURCE_DIR}/src/wallpaper-ui-service-main.c
${CMAKE_SOURCE_DIR}/src/wallpaper-ui-service.c
)
-ENDIF()
-
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/res
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
)
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
+MESSAGE("BRANCH : "${BRANCH})
+
IF("${BRANCH}" STREQUAL "PRIVATE")
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
@@ -61,7 +49,7 @@ pkg_check_modules(pkgs REQUIRED
feedback
csc-feature
tts
- efl-assist
+ efl-extension
feedback
ui-gadget-1
notification
@@ -82,7 +70,7 @@ pkg_check_modules(pkgs REQUIRED
vconf
feedback
tts
- efl-assist
+ efl-extension
feedback
ui-gadget-1
notification
@@ -118,7 +106,6 @@ ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
-ADD_DEFINITIONS("-DFESTIVALDIR=\"${FESTIVALDIR}\"")
ADD_DEFINITIONS("-DHOME_KEY_EMULATION")
#ADD_DEFINITIONS("-DFILE_DEBUG")
ADD_DEFINITIONS("-D_DLOG_USED")
@@ -130,13 +117,8 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-lm")
INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.wallpaper-ui-service.xml DESTINATION /usr/share/packages)
-#INSTALL changeable color info
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.wallpaper-ui-service_color.xml DESTINATION ${CHANGEABLEDIR})
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.wallpaper-ui-service_font.xml DESTINATION ${CHANGEABLEDIR})
-
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME ${PKGNAME})
ADD_SUBDIRECTORY(res)
IF("${BRANCH}" STREQUAL "PRIVATE")
diff --git a/src/wallpaper-ui-service-debug.h b/include/wallpaper-ui-service-debug.h
index 21d74e8..2e1fc21 100755
--- a/src/wallpaper-ui-service-debug.h
+++ b/include/wallpaper-ui-service-debug.h
@@ -1,9 +1,5 @@
/*
- * starter
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 20014-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.
@@ -16,9 +12,13 @@
* 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 __WALLPAPER_UI_SERVICE_DEBUG_H__
#define __WALLPAPER_UI_SERVICE_DEBUG_H__
@@ -35,6 +35,8 @@
#endif
#include <dlog.h>
+#define HAPI __attribute__ ((visibility ("hidden")))
+
#define WALLPAPERUI_DBG(fmt, args...) LOGD("["LOG_TAG"%s:%d:D] "fmt, __func__, __LINE__, ##args)
#define WALLPAPERUI_WARN(fmt, args...) LOGW("["LOG_TAG"%s:%d:W] "fmt, __func__, __LINE__, ##args)
#define WALLPAPERUI_ERR(fmt, args...) LOGE("["LOG_TAG"%s:%d:E] "fmt, __func__, __LINE__, ##args)
@@ -103,3 +105,9 @@
#endif
#endif /* __WALLPAPER_UI_SERVICE_DEBUG_H__ */
+
+
+/**
+* @}
+*/
+/* End of file */
diff --git a/include/wallpaper-ui-service-main.h b/include/wallpaper-ui-service-main.h
new file mode 100755
index 0000000..aa27da0
--- /dev/null
+++ b/include/wallpaper-ui-service-main.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 20014-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.
+ */
+
+/**
+ * @{
+ */
+
+
+
+#ifndef __WALLPAPER_UI_SERVICE_MAIN_H__
+#define __WALLPAPER_UI_SERVICE_MAIN_H__
+
+#include "wallpaper-ui-service.h"
+
+#include <app.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <Eina.h>
+#include <Evas.h>
+
+#include "wallpaper-ui-service-debug.h"
+
+typedef void *filter_handle;
+typedef void *media_handle;
+
+typedef struct {
+ Evas_Object *content;
+ Elm_Object_Item *item;
+ bool bSelected;
+ char *title;
+ char *path;
+ int index;
+ int type;
+} Thumbnail;
+
+#ifndef VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE
+#define VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE "db/lockscreen/wallpaper_type"
+#endif
+
+#ifndef VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT
+#define VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT "db/lockscreen/wallpaper_count"
+#endif
+
+#ifndef WALLPAPER_TXT_FILE
+#define WALLPAPER_TXT_FILE "/opt/usr/share/lockscreen/wallpaper_list/lockscreen_selected_images.txt"
+#endif
+
+
+HAPI void wallpaper_main_create_view(void *data);
+
+
+#endif
+
+/**
+* @}
+*/
+/* End of file */
diff --git a/src/wallpaper-ui-service.h b/include/wallpaper-ui-service.h
index 2d0773b..f32affb 100755
--- a/src/wallpaper-ui-service.h
+++ b/include/wallpaper-ui-service.h
@@ -1,9 +1,5 @@
/*
- * indicator
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Sung park <sung1103.park@samsung.com>
+ * Copyright (c) 20014-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.
@@ -16,7 +12,10 @@
* 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 __WALLPAPER_UI_SERVICE_H__
@@ -29,7 +28,7 @@
#include <Evas.h>
#include "wallpaper-ui-service-debug.h"
-#define PKGNAME "wallpaper-ui-service-lite"
+#define PKGNAME "wallpaper-ui-service"
#define _X(x) (x*elm_config_scale_get())
#define _EDJ(o) elm_layout_edje_get(o)
@@ -37,59 +36,48 @@
#define APP_STRING(str) dgettext(PKGNAME, str)
#define NOT_LOCALIZED(str) (str)
-#ifdef _
-#undef _
-#endif
#define _(str) gettext(str)
#define _NOT_LOCALIZED(str) (str)
+#define GENGRID_ITEM_SIZE (126)
+#define MAX_LENGTH_LINE 2001
+#define MAX_LENGTH_STRING 4096
+#define MAX_MULTIPLE_SELECTION 6
+
#if !defined(PACKAGEID)
-# define PACKAGEID "org.tizen.wallpaper-ui-service"
+#define PACKAGEID "org.tizen.wallpaper-ui-service"
#endif
#if !defined(EDJDIR)
-# define EDJDIR "/usr/apps/org.tizen.wallpaper-ui-service/res/edje"
+#define EDJDIR "/usr/apps/org.tizen.wallpaper-ui-service/res/edje"
#endif
#if !defined(ICONDIR)
-# define ICONDIR "/usr/apps/org.tizen.wallpaper-ui-service/res/icons"
-#endif
-
-#if !defined(CHANGEABLEDIR)
-# define CHANGEABLEDIR "/usr/apps/org.tizen.wallpaper-ui-service/shared/res/tables"
+#define ICONDIR "/usr/apps/org.tizen.wallpaper-ui-service/res/icons"
#endif
-
-
#define EXTRA_KEY_FILE "file_path"
-
#define EXTRA_KEY_POPUP_TYPE "popup_type"
-#define POPUP_TYPE_COLOR_KEY "color_theme_popup"
-#define POPUP_TYPE_FESTIVAL "festival"
-
-
typedef enum {
WALLPAPER_POPUP_TYPE_NONE = 0,
WALLPAPER_POPUP_TYPE_SELECTION,
WALLPAPER_POPUP_TYPE_THEME,
- WALLPAPER_POPUP_TYPE_FESTIVAL,
} wallpaper_popup_type;
+
+
#define EXTRA_KEY_WALLPAPER_TYPE "wallpaper_type"
#define EXTRA_DATA_WP_DEFAULT "default"
#define EXTRA_DATA_WP_MULTI "multi"
-#define EXTRA_DATA_WP_CP "cp"
-#define EXTRA_DATA_WP_FESTIVAL "festival"
+
typedef enum {
- WALLPAPER_TYPE_DEFAULLT = 0,
+ WALLPAPER_TYPE_DEFAULT = 0,
WALLPAPER_TYPE_GALLERY,
WALLPAPER_TYPE_MULTIPLE,
- WALLPAPER_TYPE_CP,
- WALLPAPER_TYPE_FESTIVAL,
WALLPAPER_TYPE_MAX
} wallpaper_img_type;
@@ -118,41 +106,9 @@ typedef enum {
WALLPAPER_POPUP_SETAS_HOME_N_LOCKSCREEN
} wallpaper_popup_menu;
-#define EXTRA_KEY_FESTIVAL_TYPE "festival_type"
-#define EXTRA_DATA_FESTIVAL_CREATE "festival_create"
-#define EXTRA_DATA_FESTIVAL_DELETE "festival_delete"
-#define EXTRA_DATA_FESTIVAL_TRIGGER "festival_trigger"
-
-#define EXTRA_KEY_FESTIVAL_TRIGGER "trigger_type"
-
-#define EXTRA_DATA_FESTIVAL_TRIGGER_ON "on"
-#define EXTRA_DATA_FESTIVAL_TRIGGER_OFF "off"
-
-#define EXTRA_KEY_FESTIVAL_TRIGGER_VAL "trigger_val"
-
-typedef enum {
- WALLPAPER_FESTIVAL_TYPE_NONE = 0,
- WALLPAPER_FESTIVAL_TYPE_CREATE,
- WALLPAPER_FESTIVAL_TYPE_DELETE,
- WALLPAPER_FESTIVAL_TYPE_TRIGGER,
-} wallpaper_festival_type;
-
-
-#define DISABLE_FESTIVAL_WALLPAPER 1
-#define DISABLE_CP_WALLPAPER 1
-#define DISABLE_LOGING_WALLPAPER 1
-#define DiSABLE_CROP_VIEW 1
-#define DISALBE_GALLERY_WALLPAPER 1
-
-
-typedef struct {
- int glStyle;
- int stringId;
- Evas_Object *check;
- void (*func) (void *data, Evas_Object * obj, void *event_info);
- void *data;
-} wallpaper_menu_item_info;
+#define DiSABLE_CROP_VIEW 0
+#define DISABLE_MULTISELECTION 1
typedef struct _popup_colortheme_data {
Evas_Object *popup;
@@ -170,12 +126,6 @@ typedef struct _popup_wallpaper_data {
int setas_type;
} popup_wallpaper_data;
-typedef struct _festival_data {
- int festival_type;
-} festival_wallpaper_data;
-
-
-
typedef struct page_data {
Evas_Object *scroller;
Evas_Object *index;
@@ -201,20 +151,11 @@ typedef struct _wallpaper_ui_service_appdata {
Evas *evas;
Evas_Object *win;
Evas_Object *layout;
-
- Evas_Object *home_gallery_icon;
- Evas_Object *lock_gallery_icon;
- Evas_Object *home_gallery_icon_layout;
- Evas_Object *lock_default_icon_layout;
- Evas_Object *home_default_icon_layout;
- Evas_Object *lock_gallery_icon_layout;
- Evas_Object *lock_cp_icon_layout;
int request_type;
app_control_h service; // clone service to reply when terminate
popup_wallpaper_data sel_popup_data;
popup_colortheme_data color_popup_data;
- festival_wallpaper_data festival_data;
int popup_type;
int lock_wallpaper_type;
@@ -222,22 +163,26 @@ typedef struct _wallpaper_ui_service_appdata {
unsigned int wallpaper_win_id;
page_data_s *pd;
Evas_Object *main_layout;
+ Evas_Object *thumnail_layout;
Evas_Object *box;
Evas_Object *popup;
- Elm_Object_Item *default_nf_it;
+ Evas_Object *preview_image;
+ int preview_image_type;
Elm_Object_Item *main_nf_it;
- Elm_Object_Item *sel_nf_it;
-
- Eina_Bool flag_home_from_default;
+ Evas_Object *gengrid;
E_DBus_Connection *dbus_conn;
E_DBus_Signal_Handler *dbus_home_button_handler;
+ char* last_preview_img_path;
+ char current_preview_img_path[MAX_LENGTH_LINE];
+ char saved_img_path[6][MAX_LENGTH_LINE];
} wallpaper_ui_service_appdata;
-void util_wallpaper_set(void *data);
-void reply_to_sender(void* data,int result);
-
-
#endif
+
+/**
+* @}
+*/
+/* End of file */ \ No newline at end of file
diff --git a/org.tizen.wallpaper-ui-service-lite.efl b/org.tizen.wallpaper-ui-service.efl
index 6d94b52..b6cf6c5 100755
--- a/org.tizen.wallpaper-ui-service-lite.efl
+++ b/org.tizen.wallpaper-ui-service.efl
@@ -1,7 +1,6 @@
org.tizen.wallpaper-ui-service system::use_internet r----l ------
org.tizen.wallpaper-ui-service org.tizen.pwlock rwx--l ------
org.tizen.wallpaper-ui-service org.tizen.oma-dm r-x--l ------
-org.tizen.wallpaper-ui-service ail::db rw---l ------
org.tizen.wallpaper-ui-service notification::db rw---l ------
org.tizen.wallpaper-ui-service dbus rwx--l ------
org.tizen.wallpaper-ui-service immvibed rw---l ------
@@ -17,54 +16,31 @@ org.tizen.wallpaper-ui-service data-provider-master::notification.client -w----
org.tizen.wallpaper-ui-service data-provider-master rw---l ------
org.tizen.wallpaper-ui-service device::app_logging rw---l ------
org.tizen.wallpaper-ui-service device::sys_logging rw---l ------
-stest-service org.tizen.wallpaper-ui-service r-x--l ------
dbus org.tizen.wallpaper-ui-service rwx--- ------
-org.tizen.wallpaper-ui-service eas-engine::vconf r----l ------
-org.tizen.wallpaper-ui-service system::vconf_inhouse rw---l ------
-org.tizen.wallpaper-ui-service system::vconf_setting rw---l ------
-org.tizen.wallpaper-ui-service system::vconf_network rw---l ------
-org.tizen.wallpaper-ui-service system::vconf_multimedia rw---l ------
-org.tizen.wallpaper-ui-service system::vconf_system rw---l ------
-org.tizen.wallpaper-ui-service org.tizen.facebook::vconf_sync r----l ------
-org.tizen.wallpaper-ui-service system::vconf_deviced r----l ------
-org.tizen.wallpaper-ui-service location_fw::vconf r----l ------
org.tizen.wallpaper-ui-service felicalock r----l ------
-org.tizen.wallpaper-ui-service starter::vconf r----l ------
org.tizen.wallpaper-ui-service org.tizen.music-player r----l ------
org.tizen.wallpaper-ui-service org.tizen.voicerecorder r----l ------
org.tizen.wallpaper-ui-service csc-feature r----l ------
org.tizen.wallpaper-ui-service tts-server rwx--l ------
-org.tizen.wallpaper-ui-service org.tizen.download-manager::vconf_public r----l ------
-org.tizen.wallpaper-ui-service download-provider::vconf_public r----l ------
org.tizen.wallpaper-ui-service pkgmgr::db rw---l ------
-org.tizen.wallpaper-ui-service google-pim-sync::vconf_sync_status r----l ------
-org.tizen.wallpaper-ui-service cloud-pdm::vconf_sync r----l ------
-org.tizen.wallpaper-ui-service org.tizen.setting::private r----l ------
org.tizen.wallpaper-ui-service aul::launch --x--- ------
org.tizen.wallpaper-ui-service bt-service::admin -wx--- ------
org.tizen.wallpaper-ui-service org.tizen.music-live-share r----l ------
org.tizen.wallpaper-ui-service app-svc::db rw---l ------
org.tizen.wallpaper-ui-service media-data::db rw---- ------
org.tizen.wallpaper-ui-service org.tizen.videos r----l ------
-org.tizen.wallpaper-ui-service email::vconf_sync_status r----l ------
-org.tizen.wallpaper-ui-service telephony_framework::vconf r----l ------
-org.tizen.wallpaper-ui-service ug-setting-call-efl::vconf r----l ------
org.tizen.wallpaper-ui-service org.tizen.setting::default-resources rwx--l ------
org.tizen.wallpaper-ui-service system::media rwxat- ------
org.tizen.wallpaper-ui-service system::ext_storage rwxat- ------
org.tizen.wallpaper-ui-service org.tizen.wallpaper-service rwxat- ------
org.tizen.wallpaper-ui-service lockscreen_setting::resources rwx--- ------
-org.tizen.wallpaper-ui-service lockscreen_setting::vconf rwx--l ------
org.tizen.wallpaper-ui-service alarm-server::alarm rwx--l ------
org.tizen.wallpaper-ui-service system::homedir rwxat- ------
-org.tizen.wallpaper-ui-service system::vconf rwxat- ------
org.tizen.wallpaper-ui-service system::share rwxat- ------
org.tizen.wallpaper-ui-service pulseaudio rwxat- ------
e17 org.tizen.wallpaper-ui-service -w---- ------
org.tizen.wallpaper-ui-service sys-assert::core rwxat- ------
org.tizen.wallpaper-ui-service privacy-manager::db r----l ------
-org.tizen.wallpaper-ui-service system::vconf_privacy rw---- ------
-org.tizen.wallpaper-ui-service system::vconf_misc rw---- ------
org.tizen.wallpaper-ui-service ecore::lock rwxat- ------
ug-image-viewer-efl org.tizen.wallpaper-ui-service rwx--- ------
org.tizen.lockscreen org.tizen.wallpaper-ui-service rwx--- ------
@@ -74,8 +50,12 @@ org.tizen.wallpaper-service org.tizen.wallpaper-ui-service rwx--- ------
org.tizen.wallpaper-ui-service org.tizen.wallpaper-service::wallpaper-service rwxat- ------
org.tizen.wallpaper-ui-service wallpaper-service::vconf_shared rwxat- ------
org.tizen.wallpaper-ui-service org.tizen.wallpaper-service::db rwxat- ------
-org.tizen.wallpaper-ui-service org.tizen.wallpaper-ui-service::vconf rw---- ------
org.tizen.wallpaper-ui-service connman rw---- ------
org.tizen.wallpaper-ui-service connman::get rw---- ------
org.tizen.wallpaper-ui-service deviced::haptic rwx--- ------
org.tizen.wallpaper-ui-service org.tizen.indicator rwx--- ------
+org.tizen.wallpaper-ui-service tizen::vconf::public::r rw---l ------
+org.tizen.wallpaper-ui-service tizen::vconf::public::r::platform::rw rw---l ------
+org.tizen.wallpaper-ui-service tizen::vconf::public::rw rw---l ------
+org.tizen.wallpaper-ui-service tizen::vconf::platform::rw rw---l ------
+org.tizen.wallpaper-ui-service tizen::vconf::setting rw---- ------
diff --git a/org.tizen.wallpaper-ui-service.xml b/org.tizen.wallpaper-ui-service.xml
index 0a91dc0..f152f9a 100755
--- a/org.tizen.wallpaper-ui-service.xml
+++ b/org.tizen.wallpaper-ui-service.xml
@@ -3,7 +3,7 @@
<label>Wallpapers</label>
<author email="sung1103.park@samsung.com" href="www.samsung.com">Sung park</author>
<description>Wallpapers</description>
- <ui-application appid="org.tizen.wallpaper-ui-service" exec="/usr/apps/org.tizen.wallpaper-ui-service-lite/bin/wallpaper-ui-service-lite" nodisplay="true" multiple="false" type="capp" taskmanage="false" process-pool="true" component-type="svcapp">
+ <ui-application appid="org.tizen.wallpaper-ui-service" exec="/usr/apps/org.tizen.wallpaper-ui-service/bin/wallpaper-ui-service" nodisplay="true" multiple="false" type="capp" taskmanage="false" process-pool="true">
<label>Wallpapers</label>
<label xml:lang="as-in">ৱালপেপাৰসমূহ</label>
<label xml:lang="bn-in">ওয়ালপেপারগুলি</label>
diff --git a/org.tizen.wallpaper-ui-service_color.xml b/org.tizen.wallpaper-ui-service_color.xml
deleted file mode 100644
index f8fc943..0000000
--- a/org.tizen.wallpaper-ui-service_color.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ChangeableColorTable num="1">
- <Theme style="Light">
- <ChangeableColorInfo id="AO001" inputColor="-" hue="0" saturation="0" value="3" alpha="40" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO002" inputColor="-" hue="0" saturation="0" value="96" alpha="30" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO003" inputColor="-" hue="2" saturation="84" value="88" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO004" inputColor="-" hue="0" saturation="0" value="96" alpha="50" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO005" inputColor="-" hue="0" saturation="0" value="3" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO006" inputColor="-" hue="0" saturation="0" value="3" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO007" inputColor="-" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO008" inputColor="-" hue="0" saturation="0" value="100" alpha="50" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO009" inputColor="-" hue="0" saturation="0" value="0" alpha="30" />
- <ChangeableColorInfo id="AO010" inputColor="1" hue="0" saturation="0" value="42" alpha="100" />
- <ChangeableColorInfo id="AO011" inputColor="1" hue="-7" saturation="13" value="39" alpha="85" />
- <ChangeableColorInfo id="AO013" inputColor="-" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO014" inputColor="-" hue="0" saturation="0" value="98" alpha="50" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO019" inputColor="-" hue="0" saturation="0" value="0" alpha="20" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="AO020" inputColor="1" hue="0" saturation="0" value="0" alpha="42" />
- <ChangeableColorInfo id="AO024" inputColor="-" hue="0" saturation="0" value="100" alpha="100" />
- <ChangeableColorInfo id="AO020D" inputColor="1" hue="0" saturation="0" value="0" alpha="30" />
- <ChangeableColorInfo id="AO015" inputColor="-" hue="0" saturation="0" value="0" alpha="50" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO001" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO002" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO003" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO004" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO005" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO006" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO007" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO008" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO009" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO010" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO011" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO026" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO012" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO013" inputColor="-" hue="2" saturation="84" value="88" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO014" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO015" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO016" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO017" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO018" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO019" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO020" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO021" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO022" inputColor="-" hue="0" saturation="0" value="96" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO023" inputColor="-" hue="0" saturation="0" value="3" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO024" inputColor="-" hue="0" saturation="0" value="3" alpha="50" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO025" inputColor="-" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- <ChangeableColorInfo id="ATO031" inputColor="-" hue="0" saturation="0" value="100" alpha="100" fixedHue="true" fixedSaturation="true" fixedValue="true" />
- </Theme>
-</ChangeableColorTable>
-
diff --git a/org.tizen.wallpaper-ui-service_font.xml b/org.tizen.wallpaper-ui-service_font.xml
deleted file mode 100644
index 24c4f26..0000000
--- a/org.tizen.wallpaper-ui-service_font.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<FontInfoTable>
- <FontInfo id="ATO001" style="L" size="93" />
- <FontInfo id="ATO002" style="R" size="42" />
- <FontInfo id="ATO003" style="R" size="30" />
- <FontInfo id="ATO004" style="R" size="20" />
- <FontInfo id="ATO005" style="R" size="33" />
- <FontInfo id="ATO006" style="R" size="22" />
- <FontInfo id="ATO007" style="R" size="21" />
- <FontInfo id="ATO008" style="L" size="48" />
- <FontInfo id="ATO009" style="R" size="25" />
- <FontInfo id="ATO010" style="R" size="21" />
- <FontInfo id="ATO011" style="R" size="20" />
- <FontInfo id="ATO026" style="R" size="49" />
- <FontInfo id="ATO012" style="R" size="30" />
- <FontInfo id="ATO013" style="R" size="30" />
- <FontInfo id="ATO014" style="R" size="42" />
- <FontInfo id="ATO015" style="L" size="48" />
- <FontInfo id="ATO016" style="R" size="21" />
- <FontInfo id="ATO017" style="R" size="20" />
- <FontInfo id="ATO018" style="R" size="22" />
- <FontInfo id="ATO019" style="L" size="65" />
- <FontInfo id="ATO020" style="R" size="27" />
- <FontInfo id="ATO021" style="R" size="21" />
- <FontInfo id="ATO022" style="L" size="32" />
- <FontInfo id="ATO023" style="R" size="24" />
- <FontInfo id="ATO024" style="L" size="46" />
- <FontInfo id="ATO025" style="R" size="24" />
- <FontInfo id="ATO031" style="R" size="24" />
-</FontInfoTable>
diff --git a/packaging/org.tizen.wallpaper-ui-service.spec b/packaging/org.tizen.wallpaper-ui-service.spec
index 92c09d4..b5c7d05 100755
--- a/packaging/org.tizen.wallpaper-ui-service.spec
+++ b/packaging/org.tizen.wallpaper-ui-service.spec
@@ -2,7 +2,7 @@
%define RESDIR %{PREFIX}/res
%define PREFIXRW /opt/usr/apps/%{name}
-Name: org.tizen.wallpaper-ui-service-lite
+Name: org.tizen.wallpaper-ui-service
Summary: wallpaper-ui-service window
Version: 0.0.1
Release: 1
@@ -10,6 +10,13 @@ Group: utils
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
+%if "%{?tizen_profile_name}" == "wearable"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
+%if "%{?tizen_profile_name}"=="tv"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-system-system-settings)
@@ -19,7 +26,7 @@ BuildRequires: pkgconfig(ecore-x)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(feedback)
BuildRequires: pkgconfig(tts)
-BuildRequires: pkgconfig(efl-assist)
+BuildRequires: pkgconfig(efl-extension)
BuildRequires: pkgconfig(feedback)
BuildRequires: pkgconfig(ui-gadget-1)
BuildRequires: pkgconfig(notification)
@@ -77,10 +84,9 @@ mkdir -p %{buildroot}/opt/usr/apps/org.tizen.wallpaper-ui-service/shared
mkdir -p %{buildroot}/opt/usr/apps/org.tizen.wallpaper-ui-service/shared/res
mkdir -p %{buildroot}/opt/usr/apps/org.tizen.wallpaper-ui-service/data
mkdir -p %{buildroot}/opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper
-mkdir -p %{buildroot}/opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper/festival
%define tizen_sign 1
-%define tizen_sign_base /usr/apps/org.tizen.wallpaper-ui-service-lite
+%define tizen_sign_base /usr/apps/org.tizen.wallpaper-ui-service
%define tizen_sign_level platform
%define tizen_author_sign 1
%define tizen_dist_sign 1
@@ -89,22 +95,8 @@ mkdir -p %{buildroot}/opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper
rm -rf %{buildroot}
%post
-GOPTION="-u 5000 -f"
-LOCKOPTION="-s lockscreen_setting::vconf"
-WALLPAPER="-s org.tizen.wallpaper-ui-service::vconf"
-vconftool set -t int db/lockscreen/pre_wallpaper_type 0 $GOPTION $LOCKOPTION
-vconftool set -t string db/lockscreen/pre_bgset "" $GOPTION $LOCKOPTION
-
-vconftool set -t bool db/lockscreen/cp_first_set 1 $GOPTION $WALLPAPER
-vconftool set -t bool db/lockscreen/cp_setpopup_donotshowagain 0 $GOPTION $WALLPAPER
-vconftool set -t bool db/lockscreen/cp_wifipopup_donotshowagain 0 $GOPTION $WALLPAPER
-vconftool set -t bool db/lockscreen/cp_changecategorypopup_donotshowagain 0 $GOPTION $WALLPAPER
-
-vconftool set -t bool db/lockscreen/home_wallpaper_is_default 1 $GOPTION $WALLPAPER
-vconftool set -t int db/lockscreen/wallpaper_type 0 $GOPTION $WALLPAPER
-vconftool set -t int db/lockscreen/wallpaper_count 0 $GOPTION $WALLPAPER
-#usr/bin/signing-client/hash-signer-client.sh -a -d -p platform /usr/apps/org.tizen.wallpaper-ui-service-lite
+#usr/bin/signing-client/hash-signer-client.sh -a -d -p platform /usr/apps/org.tizen.wallpaper-ui-service
%postun -p /sbin/ldconfig
@@ -112,22 +104,18 @@ vconftool set -t int db/lockscreen/wallpaper_count 0 $GOPTION $WALLPAPER
%manifest org.tizen.wallpaper-ui-service.manifest
%defattr(-,root,root,-)
%{PREFIX}/bin/*
-/usr/apps/org.tizen.wallpaper-ui-service-lite/res/locale/*
+/usr/apps/org.tizen.wallpaper-ui-service/res/locale/*
%{RESDIR}/icons/*
%{RESDIR}/edje/*
/usr/share/packages/org.tizen.wallpaper-ui-service.xml
-/usr/apps/org.tizen.wallpaper-ui-service-lite/shared/res/tables/org.tizen.wallpaper-ui-service_color.xml
-/usr/apps/org.tizen.wallpaper-ui-service-lite/shared/res/tables/org.tizen.wallpaper-ui-service_font.xml
/usr/share/license/%{name}
/etc/smack/accesses.d/%{name}.efl
-/usr/apps/org.tizen.wallpaper-ui-service-lite/author-signature.xml
-/usr/apps/org.tizen.wallpaper-ui-service-lite/signature1.xml
-/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/*
+/usr/apps/org.tizen.wallpaper-ui-service/author-signature.xml
+/usr/apps/org.tizen.wallpaper-ui-service/signature1.xml
%attr(-,app,app) %dir /opt/usr/apps/org.tizen.wallpaper-ui-service/shared
%attr(-,app,app) %dir /opt/usr/apps/org.tizen.wallpaper-ui-service/shared/res
%attr(-,app,app) %dir /opt/usr/apps/org.tizen.wallpaper-ui-service/data
%attr(-,app,app) %dir /opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper
-%attr(-,app,app) %dir /opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper/festival
%attr(755,app,app)/opt/usr/share/lockscreen
%attr(755,app,app)/opt/usr/share/lockscreen/wallpaper_list
diff --git a/res/resources/CMakeLists.txt b/res/resources/CMakeLists.txt
index 1c779a1..26d6dbe 100644..100755
--- a/res/resources/CMakeLists.txt
+++ b/res/resources/CMakeLists.txt
@@ -9,9 +9,19 @@ ADD_DEPENDENCIES(${PROJECT_NAME} popup-wallpaper.edj)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/edje/popup-wallpaper.edj DESTINATION ${EDJDIR})
+ADD_CUSTOM_TARGET(button_customized_theme.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/icons
+ -sd ${CMAKE_CURRENT_SOURCE_DIR}/sounds
+ ${CMAKE_CURRENT_SOURCE_DIR}/edje/button_customized_theme.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/edje/button_customized_theme.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/edje/button_customized_theme.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} button_customized_theme.edj)
+
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/edje/button_customized_theme.edj DESTINATION ${EDJDIR})
+
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.png")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.PNG")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.gif")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/festival DESTINATION ${FESTIVALDIR} FILES_MATCHING PATTERN "*.jpg")
diff --git a/res/resources/edje/button_customized_theme.edc b/res/resources/edje/button_customized_theme.edc
new file mode 100755
index 0000000..144ee67
--- /dev/null
+++ b/res/resources/edje/button_customized_theme.edc
@@ -0,0 +1,519 @@
+/*
+ * Copyright (c) 20014-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.
+ */
+
+
+ //****************************************************************************//
+ // Button
+ //****************************************************************************//
+
+#define BUTTON_MIN_WIDTH_INC 50
+#define BUTTON_MIN_HEIGHT_INC 78
+#define BUTTON_BOTTOM_MIN_WIDTH_INC 118
+#define BUTTON_BOTTOM_MIN_HEIGHT_INC 104
+#define BUTTON_BG_MIN_HEIGHT_INC 44
+#define BUTTON_PADDING_ICON_RIGHT_INC 14
+#define BUTTON_PADDING_LEFT_RIGHT_INC 32
+#define BUTTON_PADDING_LEFT_ICON_TEXT_INC 56
+#define BUTTON_BG_PADDING_LEFT_RIGHT_INC 22
+#define BUTTON_PADDING_TOP_HEIGHT_INC 10
+#define BUTTON_PADDING_BOTTOM_HEIGHT_INC 14
+#define BUTTON_BOTTOM_PADDING_TOP_HEIGHT_INC 22
+#define BUTTON_BOTTOM_PADDING_BOTTOM_HEIGHT_INC 28
+#define BUTTON_ICON_HEIGHT_INC 80
+#define BUTTON_ICON_WIDTH_INC 80
+#define BUTTON_ICON_DEFAULT_HEIGHT_INC 60
+#define BUTTON_ICON_DEFAULT_WIDTH_INC 60
+
+#define BUTTON_CIRCLE_SIZE_INC 98 98
+#define BUTTON_CIRCLE_BASE_SIZE_INC 100 98
+#define BUTTON_CIRCLE_EXTENDED_SIZE_INC 100 199
+#define BUTTON_CIRCLE_ICON_SIZE_INC 60 60
+#define BUTTON_CIRCLE_PADDING_ICON_BOTTOM_INC 13
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_SIZE_INC 67 67
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_BG_SIZE_INC 67 67
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_IMAGE_SIZE_INC 67 67
+#define BUTTON_NAVIFRAME_DRAWERS_WIDTH_INC 55
+#define BUTTON_NAVIFRAME_DRAWERS_IMAGE_SIZE_INC 55 72
+#define BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC 80 80
+
+#define BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_SIZE_INC 150 70
+#define BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_LEFT_PADDING_WIDTH_INC 32
+#define BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_RIGHT_PADDING_WIDTH_INC 23
+#define BUTTON_NAVIFRAME_TITLE_RIGHT_BUTTON_LEFT_PADDING_WIDTH_INC 23
+#define BUTTON_NAVIFRAME_TITLE_RIGHT_BUTTON_RIGHT_PADDING_WIDTH_INC 32
+
+#define STYLE_TAGS \
+ tag: "br" "\n";\
+ tag: "ps" "ps";\
+ tag: "tab" "\t";\
+ tag: "b" "+ font_weight=Bold";
+
+#define STYLE_TAG_MATCH \
+ tag: "match" "+ color=#3db8cc";
+
+
+collections {
+
+ base_scale: 2.4;
+
+
+ styles{
+ style { name: "button_title_right";
+ base: "color=#ffffffdd align=center font=Tizen:style=Regular font_size=32 text_class=tizen wrap=mixed ellipsis=1.0";
+ STYLE_TAGS
+ }
+ style { name: "button_title_right_press";
+ base: "color=#ffffffff align=center font=Tizen:style=Regular font_size=32 text_class=tizen wrap=mixed ellipsis=1.0";
+ STYLE_TAGS
+ }
+ style { name: "button_title_right_dim";
+ base: "color=#ffffff92 align=center font=Tizen:style=Regular font_size=32 text_class=tizen wrap=mixed ellipsis=1.0";
+ STYLE_TAGS
+ }
+ }
+
+
+ group { name: "elm/button/base/naviframe/title_left_custom";
+ script {
+ public mouse_down = 0;
+ public multi_down = 0;
+ public check_disabled = 0;
+ }
+ parts {
+ part { name: "button_bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "button_bg_clipper";
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_SIZE_INC;
+ max: BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_SIZE_INC;
+ fixed: 1 1;
+ color: 0 0 0 0 ;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 30 ;
+ }
+ }
+ part { name: "button_bg_clipper";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 255 255 255 255;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 193 193 193 255;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ color: 61 185 204 77;
+ }
+ }
+ part { name: "left_padding";
+ type: SPACER;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_LEFT_PADDING_WIDTH_INC 0;
+ max: BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_LEFT_PADDING_WIDTH_INC -1;
+ align: 0.0 0.0;
+ fixed: 1 1;
+ rel1 { to: "button_bg"; relative: 0.0 0.0; }
+ rel2 { to: "button_bg"; relative: 0.0 1.0; }
+ }
+ }
+ part { name: "right_padding";
+ type: SPACER;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_RIGHT_PADDING_WIDTH_INC 0;
+ max: BUTTON_NAVIFRAME_TITLE_LEFT_BUTTON_RIGHT_PADDING_WIDTH_INC -1;
+ align: 1.0 0.0;
+ fixed: 1 1;
+ rel1 { to: "button_bg"; relative: 1.0 0.0; }
+ rel2 { to: "button_bg"; relative: 1.0 1.0; }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 0.0 0.5;
+ rel1 { to: "left_padding"; relative: 1.0 0.0; }
+ rel2 { to: "right_padding"; relative: 0.0 1.0; }
+ text {
+ style: "button_title_left";
+ min: 0 1;
+ }
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ text.style: "button_title_left_press";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text.style: "button_title_left_dim";
+ }
+ }
+ part { name: "over2";
+ type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "over3";
+ type: RECT;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "button_press";
+ signal: "mouse,down,1*";
+ source: "over2";
+ script {
+ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
+ {
+ set_int(mouse_down, 1);
+ set_state(PART:"button_bg", "pressed", 0.0);
+ emit("elm,action,press", "");
+ }
+ }
+ }
+ program { name: "button_unpress";
+ signal: "mouse,up,1*";
+ source: "over3";
+ script {
+ if (get_int(mouse_down) == 1)
+ {
+ set_int(mouse_down, 0);
+ set_state(PART:"button_bg", "default", 0.0);
+ emit("elm,action,unpress", "");
+ }
+ }
+ }
+ program { name: "button_click";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ script {
+ if (get_int(multi_down) == 0) {
+ run_program(PROGRAM:"play_sound");
+ emit("elm,action,click", "");
+ }
+ }
+ }
+ program { name: "play_sound";
+ action: RUN_PLUGIN "touch_sound";
+ }
+ program { name: "key_press";
+ signal: "elm,action,pressed";
+ source: "elm";
+ action: STATE_SET "pressed" 0.0;
+ target: "button_bg_clipper";
+ }
+ program { name: "key_unpress";
+ signal: "elm,action,unpressed";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_bg_clipper";
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_bg_clipper";
+ target: "elm.text";
+ target: "disabler";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_bg_clipper";
+ target: "elm.text";
+ target: "disabler";
+ }
+ program {
+ name: "multi_down";
+ signal: "elm,action,multi,down";
+ source: "elm";
+ script {
+ set_int(multi_down, 1);
+ }
+ }
+ program {
+ name: "multi_up";
+ signal: "elm,action,multi,up";
+ source: "elm";
+ script {
+ set_int(multi_down, 0);
+ }
+ }
+ }
+ }
+
+ group { name: "elm/button/base/naviframe/title_right_custom";
+ inherit: "elm/button/base/naviframe/title_left_custom";
+ parts {
+ part { name: "left_padding";
+ type: SPACER;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_TITLE_RIGHT_BUTTON_LEFT_PADDING_WIDTH_INC 0;
+ max: BUTTON_NAVIFRAME_TITLE_RIGHT_BUTTON_LEFT_PADDING_WIDTH_INC -1;
+ align: 0.0 0.0;
+ fixed: 1 1;
+ rel1 { to: "button_bg"; relative: 0.0 0.0; }
+ rel2 { to: "button_bg"; relative: 0.0 1.0; }
+ }
+ }
+ part { name: "right_padding";
+ type: SPACER;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_TITLE_RIGHT_BUTTON_RIGHT_PADDING_WIDTH_INC 0;
+ max: BUTTON_NAVIFRAME_TITLE_RIGHT_BUTTON_RIGHT_PADDING_WIDTH_INC -1;
+ align: 1.0 0.0;
+ fixed: 1 1;
+ rel1 { to: "button_bg"; relative: 1.0 0.0; }
+ rel2 { to: "button_bg"; relative: 1.0 1.0; }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1 { to: "left_padding"; relative: 1.0 0.0; }
+ rel2 { to: "right_padding"; relative: 0.0 1.0; }
+ text {
+ style: "button_title_right";
+ min: 0 1;
+ }
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ text.style: "button_title_right_press";
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text.style: "button_title_right_dim";
+ }
+ }
+ }
+ }
+
+ group { name: "elm/button/base/naviframe/back_btn/custom";
+ alias: "elm/button/base/naviframe/end_btn/default";
+ images {
+ set {
+ name: "core_icon_back";
+ image {
+ image: "icons/core_icon_back.png" COMP;
+ }
+ }
+ }
+ script {
+ public mouse_down = 0;
+ public multi_down = 0;
+ public check_disabled = 0;
+ }
+ parts {
+ part { name: "button_bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "button_bg_clipper";
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC;
+ max: BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC;
+ fixed: 1 1;
+ color: 0 0 0 0;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 30;
+ }
+ }
+ part { name: "button_bg_clipper";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 255 255 255 255;
+ }
+ description { state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 193 193 193 255;
+ }
+ }
+ part { name: "button_icon";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC;
+ max: BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC;
+ fixed: 1 1;
+ color: 255 255 255 255;
+ image.normal: "core_icon_back";
+ }
+ }
+ part { name: "over2";
+ type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "over3";
+ type: RECT;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "disabler";
+ type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "button_bg";
+ rel2.to: "button_bg";
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ }
+ programs {
+ program { name: "button_press";
+ signal: "mouse,down,1*";
+ source: "over2";
+ script {
+ if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0))
+ {
+ set_int(mouse_down, 1);
+ set_state(PART:"button_bg", "pressed", 0.0);
+ emit("elm,action,press", "");
+ }
+ }
+ }
+ program { name: "button_unpress";
+ signal: "mouse,up,1*";
+ source: "over3";
+ script {
+ if (get_int(mouse_down) == 1)
+ {
+ set_int(mouse_down, 0);
+ set_state(PART:"button_bg", "default", 0.0);
+ emit("elm,action,unpress", "");
+ }
+ }
+ }
+ program { name: "button_click";
+ signal: "mouse,clicked,1";
+ source: "over2";
+ script {
+ if (get_int(multi_down) == 0) {
+ run_program(PROGRAM:"play_sound");
+ emit("elm,action,click", "");
+ }
+ }
+ }
+ program { name: "play_sound";
+ action: RUN_PLUGIN "touch_sound";
+ }
+ program { name: "key_press";
+ signal: "elm,action,pressed";
+ source: "elm";
+ action: STATE_SET "pressed" 0.0;
+ target: "button_bg_clipper";
+ }
+ program { name: "key_unpress";
+ signal: "elm,action,unpressed";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_bg_clipper";
+ }
+ program { name: "enable";
+ signal: "elm,state,enabled";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "button_bg_clipper";
+ }
+ program { name: "disable";
+ signal: "elm,state,disabled";
+ source: "elm";
+ action: STATE_SET "disabled" 0.0;
+ target: "button_bg_clipper";
+ }
+ program {
+ name: "multi_down";
+ signal: "elm,action,multi,down";
+ source: "elm";
+ script {
+ set_int(multi_down, 1);
+ }
+ }
+ program {
+ name: "multi_up";
+ signal: "elm,action,multi,up";
+ source: "elm";
+ script {
+ set_int(multi_down, 0);
+ }
+ }
+ }
+ }
+}
+
+
diff --git a/res/resources/edje/color_classes.edc b/res/resources/edje/color_classes.edc
new file mode 100644
index 0000000..f0761b3
--- /dev/null
+++ b/res/resources/edje/color_classes.edc
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 20014-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.
+ */
+
+color_classes {
+ color_class {
+ name: "AO001";
+ color: 7 7 7 102;
+ }
+ color_class {
+ name: "AO002";
+ color: 244 244 244 76;
+ }
+ color_class {
+ name: "AO003";
+ color: 224 42 35 255;
+ }
+ color_class {
+ name: "AO004";
+ color: 244 244 244 127;
+ }
+ color_class {
+ name: "AO005";
+ color: 7 7 7 255;
+ }
+ color_class {
+ name: "AO006";
+ color: 7 7 7 255;
+ }
+ color_class {
+ name: "AO007";
+ color: 255 255 255 255;
+ }
+ color_class {
+ name: "AO008";
+ color: 255 255 255 127;
+ }
+ color_class {
+ name: "AO009";
+ color: 0 0 0 76;
+ }
+ color_class {
+ name: "AO010";
+ color: 35 185 255 255;
+ }
+ color_class {
+ name: "AO011";
+ color: 2 198 247 216;
+ }
+ color_class {
+ name: "AO013";
+ color: 255 255 255 255;
+ }
+ color_class {
+ name: "AO014";
+ color: 249 249 249 127;
+ }
+ color_class {
+ name: "AO019";
+ color: 0 0 0 51;
+ }
+ color_class {
+ name: "AO020";
+ color: 20 107 147 107;
+ }
+ color_class {
+ name: "AO024";
+ color: 255 255 255 255;
+ }
+ color_class {
+ name: "AO020D";
+ color: 20 107 147 76;
+ }
+ color_class {
+ name: "AO015";
+ color: 0 0 0 127;
+ }
+ color_class {
+ name: "ATO001";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO002";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO003";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO004";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO005";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO006";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO007";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO008";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO009";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO010";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO011";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO026";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO012";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO013";
+ color: 224 42 35 255;
+ }
+ color_class {
+ name: "ATO014";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO015";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO016";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO017";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO018";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO019";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO020";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO021";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO022";
+ color: 244 244 244 255;
+ }
+ color_class {
+ name: "ATO023";
+ color: 7 7 7 255;
+ }
+ color_class {
+ name: "ATO024";
+ color: 7 7 7 127;
+ }
+ color_class {
+ name: "ATO025";
+ color: 255 255 255 255;
+ }
+ color_class {
+ name: "ATO031";
+ color: 255 255 255 255;
+ }
+}
diff --git a/res/resources/edje/cp-wallpaper-main-view.edc b/res/resources/edje/cp-wallpaper-main-view.edc
deleted file mode 100755
index 2697d29..0000000
--- a/res/resources/edje/cp-wallpaper-main-view.edc
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * cp-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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.
- *
- */
-
-group{
-
- name: "cp.wallpaper.main";
- parts{
- part {
- name: "bg";
- type: RECT;
- mouse_events: 1;
- repeat_events: 0;
- description {
- state: "default" 0.0;
- rel1 { relative: 0 0; }
- rel2 { relative: 1 1; }
- color_class : "B0216";
- }
- }
- part {
- name: "cp";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- repeat_events: 0;
- description {
- state: "default" 0.0;
- rel1 {
- to: "bg";
- relative : 0.0 0.0;
- }
- rel2 {
- to: "bg";
- relative : 1.0 1.0;
- }
- }
- }
- }
-}
-
-group {
- name: "cp_gengrid.item";
-
- parts {
-
- part { name: "border";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 125 125 125 125;
- visible: 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- }
- }
-
- part { name: "bg";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 1;
- rel1 { relative: 0.0 0.0; offset: 2 2; }
- rel2 { relative: 1.0 1.0; offset: -3 -3; }
- }
- }
-
- part { name: "item";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- part { name: "check";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 1.0 0.5;
- min: 40 40;
- fixed: 1 1;
- rel1 { relative: 0.85 0.10; to: "item";}
- rel2 { relative: 0.95 0.25; to: "item";}
- }
- }
- }
-}
-
-#define POPUP_CHECK_VIEW_LAYOUT_MIN_INC 0 252
-#define POPUP_CHECK_VIEW_LAYOUT_CONTENT_MIN_INC 0 192
-#define POPUP_CHECK_VIEW_LAYOUT_BOTTOM_MIN_INC 0 60
-#define POPUP_CHECK_VIEW_SWALLOW_END_MIN_INC 40 40
-#define POPUP_CONTENT_DEFAULT_PADDING_LEFT_MIN_INC 18
-#define POPUP_CONTENT_DEFAULT_PADDING_RIGHT_MIN_INC 18
-group { name: "popup_checkview_layout";
- parts {
- part { name: "bg";
- scale: 1;
- type: SPACER;
- description { state: "default" 0.0;
- min: POPUP_CHECK_VIEW_LAYOUT_MIN_INC;
- fixed: 1 0;
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: POPUP_CONTENT_DEFAULT_PADDING_LEFT_MIN_INC 0;
- fixed: 1 0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 0.0 1.0;
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: POPUP_CONTENT_DEFAULT_PADDING_RIGHT_MIN_INC 0;
- fixed: 1 0;
- rel1.relative: 1.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 1.0 0.0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- //fixed: 0 1;
- fixed: 1 0;
- min: POPUP_CHECK_VIEW_LAYOUT_CONTENT_MIN_INC;
- align: 0.5 0.0;
- rel2 {
- relative: 1.0 0.0;
- to: "pad_b";
- }
- }
- }
- part { name: "pad_b";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 1.0;
- min: POPUP_CHECK_VIEW_LAYOUT_BOTTOM_MIN_INC;
- fixed: 0 1;
- rel1.relative: 0.0 1.0;
- }
- }
- part { name: "elm.swallow.end";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 0.5;
- min: POPUP_CHECK_VIEW_SWALLOW_END_MIN_INC;
- fixed: 1 1;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- to_y: "pad_b";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_b";
- }
- }
- }
- }
-}
-
-#define FONT_STYLE " color=#fefefeff style=tizen_shadow shadow_color=#000000cc "
-
-group {
- styles
- {
- style {
- name: "textblock_style";
- base: "font=Tizen:style=Regular text_class=ATO023 font_size=24 align=left wrap=mixed color_class=ATO025"FONT_STYLE;
- tag: "br" "\n";
- tag: "hilight" "+ color=#ffff";
- tag: "b" "+ color=#ffff";
- tag: "tab" "\t";
- }
- }
- images {
- image: "thumbnail_Badge_ic.png" COMP;
- image: "thumbnail_bg.png" COMP;
- }
-
- name: "gengrid.item.check";
-
- parts {
-
- part { name: "border";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- //color: 125 125 125 125;
- visible: 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- }
- }
-
- part { name: "bg";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- }
- }
-
- part { name: "item";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- part { name: "check";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- fixed : 1 1;
- align : 1.0 0.0;
- rel1 { relative: (158-14)/158 14/158; to: "item";}
- rel2 { relative: (158-14)/158 14/158; to: "item";}
- }
- }
- part { name: "thumbnail_bg";
- type: IMAGE;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- image.normal: "thumbnail_bg.png";
- fixed:1 1;
- visible: 1;
- rel1 { relative: 0.0 89/158; to: "item";}
- rel2 { relative: 1.0 1.0; to: "item";}
- color_class:"AO015";
- }
- }
- part { name: "text";
- type: TEXTBLOCK;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- fixed:1 1;
- visible: 1;
- align: 0.0 0.0;
- rel1 { relative: 8/158 4/69; to: "thumbnail_bg";}
- rel2 { relative: (158-8)/158 (69-2)/69; to: "thumbnail_bg";}
- text {
- style: textblock_style;
- align: 0.0 0.0;
- }
- }
- }
- /*part { name: "name_text";
- type: TEXTBLOCK;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- min:115 32;
- fixed:1 1;
- visible: 1;
- align: 0.5 0.0;
- rel1 { relative: 0.0 1.0; to: "text";}
- rel2 { relative: 1.0 1.0; to: "text";}
- text {
- style: textblock_style;
- }
- }
- }*/
- /*part { name: "badge_icon";
- type: IMAGE;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- image.normal: "thumbnail_Badge_ic.png";
- fixed:1 1;
- visible: 1;
- rel1 { relative: 115/158 106/158; to: "item";}
- rel2 { relative: 149/158 140/158; to: "item";}
- }
- description {state: "no_badge" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }*/
- }
- /*programs{
- program { name: "badge";
- signal: "badge";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "badge_icon";
- }
- program { name: "no_badge";
- signal: "no_badge";
- source: "elm";
- action: STATE_SET "no_badge" 0.0;
- target: "badge_icon";
- }
- }*/
-}
-
-group{ name: "popup_wifi_check_layout";
- parts {
- part { name: "bg";
- scale: 1;
- type: SPACER;
- description { state: "default" 0.0;
- min: 0 252;
- fixed: 1 0;
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 15 0;
- fixed: 1 0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 0.0 1.0;
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 15 0;
- fixed: 1 0;
- rel1.relative: 1.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 1.0 0.0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- //fixed: 0 1;
- fixed: 1 0;
- min: 0 162;
- align: 0.5 0.0;
- rel2 {
- relative: 1.0 0.0;
- to: "pad_b";
- }
- }
- }
- part { name: "pad_b";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 1.0;
- min: 0 90;
- fixed: 0 1;
- rel1.relative: 0.0 1.0;
- }
- }
- part { name: "elm.swallow.end";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 0.5;
- min: 40 40;
- fixed: 1 1;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- to_y: "pad_b";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_b";
- }
- }
- }
- }
-}
-
-group { name: "processing_view";
- styles {
- style { name: "popup_processing";
- base: "font=Tizen:style=Regular align=left font_size=30 color=#FFFFFF color_class=T123 wrap=mixed ellipsis=1.0 text_class=T123";
- tag: "br" "\n";
- tag: "tab" "\t";
- }
- }
- parts {
- part { name: "bg";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 96;
- fixed: 1 0;
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 27 0;
- fixed: 1 0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 0.0 1.0;
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 15 0;
- fixed: 1 0;
- rel1.relative: 1.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 1.0 0.0;
- }
- }
- part { name: "processing";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
- min: 36 36;
- max: 36 36;
- rel1 {
- relative: 1.0 0.0;
- to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "pad_r";
- }
- align: 0.0 0.5;
- }
- }
- part { name: "pad_after_processing";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
- min: 15 96;
- rel1 {
- relative: 1.0 0.0;
- to: "processing";
- }
- rel2.to: "processing";
- align: 0.0 0.5;
- }
- }
- part { name: "elm.text";
- type: TEXTBLOCK;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 96;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;
- to: "pad_after_processing";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "pad_r";
- }
- align: 0.0 0.5;
- text {
- style: "popup_processing";
- min: 0 1;
- }
- }
- }
- }
-}
-
diff --git a/res/resources/edje/gengrid_customized_theme.edc b/res/resources/edje/gengrid_customized_theme.edc
index c1a3543..b3ed766 100644
--- a/res/resources/edje/gengrid_customized_theme.edc
+++ b/res/resources/edje/gengrid_customized_theme.edc
@@ -1,9 +1,5 @@
/*
- * starter
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Zhang Qijie <qijie.zhang@samsung.com>, Xing Meiju <meiju.xing@samsung.com>
+ * Copyright (c) 20014-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.
diff --git a/res/resources/edje/mutiple-wallpaper.edc b/res/resources/edje/mutiple-wallpaper.edc
index 3245624..a5202e7 100755
--- a/res/resources/edje/mutiple-wallpaper.edc
+++ b/res/resources/edje/mutiple-wallpaper.edc
@@ -1,9 +1,5 @@
/*
- * popup-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 20014-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.
@@ -295,14 +291,36 @@ group{
}
image.normal: "thumbnail_focus.#.png";
image.border: 6 6 6 6;
- color_class: "AO010";
+ color_class: "ATO003";
}
- description {
- state: "enabled" 0.0;
- inherit: "default" 0.0;
- visible: 1;
+ description {
+ state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "text";
+ type: TEXTBLOCK;
+ effect : "TIZEN_SHADOW";
+ mouse_events : 0;
+ repeat_events : 1;
+ scale: 1;
+ description {state: "default" 0.0;
+ color : LOCK_TEXT_COLOR;
+ color2 : LOCK_TEXT_COLOR2;
+ color3 : LOCK_TEXT_COLOR3;
+ fixed:0 1;
+ visible: 1;
+ align : 0.5 1.0;
+ rel1 { relative: 5/137 130/137; to: "item";}
+ rel2 { relative: 132/137 130/137; to: "item";}
+ text {
+ style: style_default_and_gallery;
+ min : 0 1;
+ align : 0.5 1.0;
+ }
+ }
}
- }
} // parts
programs {
@@ -323,6 +341,14 @@ group{
}
+ program {
+ name: "set_action_focus";
+ signal: "elm,focus_highlight,show";
+ source: "app";
+ action: STATE_SET "enabled" 0.0;
+ target: "focus_bg";
+ }
+
}
}
@@ -417,76 +443,6 @@ group {
}
}
-group {
- name: "default_gengrid.color_palette_item";
-
- images {
- image: "single_selection.png" COMP;
- }
-
- parts {
-
- part { name: "border";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- //color: 125 125 125 125;
- visible: 1;
- rel1 { relative: 0.0 0.0; }
- rel2 { relative: 1.0 1.0; }
- }
- }
-
- part { name: "bg";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- color_class: "AO020";
- }
- description {
- state: "pressed" 0.0;
- inherit: "default";
- color_class: "AO011";
- }
- }
-
- part { name: "icon";
- type: IMAGE;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- image.normal: "single_selection.png";
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- }
-
-/* programs{
- program { name: "pressed";
- signal: "pressed";
- source: "elm";
- action: STATE_SET "pressed" 0.0;
- target: "bg";
- }
- program { name: "unpressed";
- signal: "unpressed";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "bg";
- }
- }*/
-}
-
-
group{
name: "wallpaper_lock.default";
diff --git a/res/resources/edje/popup-color-theme-main-view.edc b/res/resources/edje/popup-color-theme-main-view.edc
deleted file mode 100755
index bc85430..0000000
--- a/res/resources/edje/popup-color-theme-main-view.edc
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * popup-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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.
- *
- */
-
-group { name: "popup_color_theme";
- parts {
- part { name: "pad_t";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 0.0;
- min: 0 20;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 0.0;to_x: "pad_r";
- }
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 47 0;
- max: 47 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 47 0;
- max: 47 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- to_y: "pad_t";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_b";
- }
- }
- }
- part { name: "bottom_pad";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 1.0;
- min: 0 32;
- fixed: 0 1;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "pad_r";
- }
- }
- }
- part { name: "pad_b";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 1.0;
- min: 0 340;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- to: "bottom_pad";
- }
- rel2 {
- relative: 1.0 0.0;
- to: "bottom_pad";
- }
- }
- }
- part { name: "end_field";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.0 1.0;
- min: 0 320;
- fixed: 0 1;
- rel1 {
- relative: 0.0 1.0;
- to: "pad_b";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "pad_b";
- }
- }
- }
- part { name: "elm.swallow.icon.bg";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
- min: 180 320;
- max: 180 320;
- align: 0.5 0.5;
- rel1.to: "end_field";
- rel2.to: "end_field";
- }
- }
- part { name: "elm.swallow.icon";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
- min: 180 320;
- max: 180 320;
- align: 0.5 0.5;
- rel1.to: "end_field";
- rel2.to: "end_field";
- }
- }
- }
-}
diff --git a/res/resources/edje/popup-wallpaper-macro.edc b/res/resources/edje/popup-wallpaper-macro.edc
index 7cc281f..6f33d02 100644
--- a/res/resources/edje/popup-wallpaper-macro.edc
+++ b/res/resources/edje/popup-wallpaper-macro.edc
@@ -1,9 +1,5 @@
/*
- * starter
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 20014-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.
diff --git a/res/resources/edje/popup-wallpaper-main-view.edc b/res/resources/edje/popup-wallpaper-main-view.edc
index 50d2e4e..7ab880d 100755
--- a/res/resources/edje/popup-wallpaper-main-view.edc
+++ b/res/resources/edje/popup-wallpaper-main-view.edc
@@ -1,9 +1,5 @@
/*
- * popup-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 20014-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.
@@ -19,7 +15,43 @@
*
*/
-#define LOCK_FONT_STYLE " color=#fefefeff style=tizen_shadow shadow_color=#000000cc "
+#define LOCK_FONT_STYLE " color=#fefefeff style=shadow shadow_color=#000000cc "
+#define NAVIFRAME_TOOLBAR_HEIGHT_INC 0 //28
+
+#define NAVIFRAME_VIEW_PUSH_TRANS_TIME 0.5
+#define NAVIFRAME_VIEW_POP_TRANS_TIME 0.5
+
+#define NAVIFRAME_TITLE_HEIGHT_INC 110
+#define NAVIFRAME_SUBTITLE_HEIGHT_INC 38
+#define NAVIFRAME_TITLE_TOP_PADDING_HEIGHT_INC 3
+#define NAVIFRAME_SUBTITLE_BOTTOM_PADDING_HEIGHT_INC 3
+#define NAVIFRAME_TABBAR_HEIGHT_INC 110
+#define NAVIFRAME_TABBAR_TITLE_HEIGHT_INC 100
+#define NAVIFRAME_NAVIGATIONBAR_HEIGHT_INC 70
+#define NAVIFRAME_NAVIGATIONBAR_TOP_DIVIDER_HEIGHT_INC 2
+#define NAVIFRAME_TABBAR_TOP_DIVIDER_HEIGHT_INC 0
+#define NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC 0
+#define NAVIFRAME_TITLE_RIGHT_PADDING_WIDTH_INC 23
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 120 108
+#define NAVIFRAME_BADGE_ICON_LEFT_PADDING_WIDTH_INC 22
+#define NAVIFRAME_BADGE_TEXT_LEFT_PADDING_WIDTH_INC 22
+#define NAVIFRAME_BADGE_HEIGHT_INC 48
+#define NAVIFRAME_BADGE2_PADDING_WIDTH_INC (NAVIFRAME_BADGE_ICON_LEFT_PADDING_WIDTH_INC + NAVIFRAME_BADGE_TEXT_LEFT_PADDING_WIDTH_INC + NAVIFRAME_BADGE_TEXT_LEFT_PADDING_WIDTH_INC)
+#define NAVIFRAME_DRAWERS_WIDTH_INC 82
+#define NAVIFRAME_TOOLBAR_HEIGHT_INC 0
+#define NAVIFRAME_TOOLBAR_COLOR_INC 245 245 245 255
+#define NAVIFRAME_BACK_BUTTON_LR_PADDING_WIDTH_INC 10
+#define NAVIFRAME_BACK_BUTTON_TITLE_RIGHT_PADDING_WIDTH_INC 100
+#define NAVIFRAME_TITLE_TEXT_FONT_SIZE_INC 50
+#define NAVIFRAME_SUBTITLE_VISIBLE_TEXT_FONT_SIZE_INC 42
+#define NAVIFRAME_VISIBLE_TEXT_FONT_SIZE_INC 28
+
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_SIZE_INC 67 67
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_BG_SIZE_INC 67 67
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_IMAGE_SIZE_INC 67 67
+#define BUTTON_NAVIFRAME_DRAWERS_WIDTH_INC 55
+#define BUTTON_NAVIFRAME_DRAWERS_IMAGE_SIZE_INC 55 72
+#define BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC 80 80
styles{
style {
@@ -32,7 +64,7 @@ styles{
}
style {
name: "style_default_and_gallery";
- base: "font=Tizen:style=Regular text_class=ATO025 font_size=24 align=center wrap=mixed color_class=ATO025"LOCK_FONT_STYLE;
+ base: "font=Tizen:style=Regular text_class=ATO025 font_size=30 align=center wrap=mixed"LOCK_FONT_STYLE;
tag: "br" "\n";
tag: "hilight" "+ color=#ffff";
tag: "b" "+ color=#ffff";
@@ -40,842 +72,37 @@ styles{
}
style {
name: "style_default_and_gallery_dim";
- base: "font=Tizen:style=Regular text_class=ATO025D font_size=24 align=center wrap=mixed color_class=ATO025D"LOCK_FONT_STYLE;
+ base: "font=Tizen:style=Regular text_class=ATO025D font_size=24 align=center wrap=mixed"LOCK_FONT_STYLE;
tag: "br" "\n";
tag: "hilight" "+ color=#ffff";
tag: "b" "+ color=#ffff";
tag: "tab" "\t";
}
-}
-
-group{
- name: "popup.wallpaper.main";
- parts{
- part{
- name: "background";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description{
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- color: 0 0 0 0;
- }
- }
-/* part{
- name: "elm.swallow.genlist";
- type: SWALLOW;
- mouse_events: 1;
- scale: 1;
- description{
- state: "default" 0.0;
- rel1 {relative: 0.0 0.0; to: "background";}
- //rel2 {relative: 1.0 0.4; to: "background";}
- rel2 {relative: 1.0 1.0; to: "background";}
- }
- }*/
+ style {
+ name: "style_text_tap";
+ base: "font=Tizen:style=Bold text_class=ATO003 font_size=35 align=center wrap=mixed"LOCK_FONT_STYLE;
+ tag: "br" "\n";
+ tag: "hilight" "+ color=#ffff";
+ tag: "b" "+ color=#ffff";
+ tag: "tab" "\t";
}
- programs{
+ style { name: "naviframe_title_style";
+ base: "font=Tizen:style=Regular align=center font_size=47 color=#FFFFFFFF wrap=mixed ellipsis=1.0 text_class=ATO025 style=shadow shadow_color=#0000004C";
+ tag: "br" "\n";
+ tag: "tab" "\t";
}
-}
-
-group{ name: "popup_checkview_image_2icons";
- parts {
- part{ name : "bg";
- type: RECT;
- description{
- state: "default" 0.0;
- color: 8 8 8 8;
- }
- }
- part { name: "pad_t";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 0.0;
- min: 0 0;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 0.0;to_x: "pad_r";
- }
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- to_y: "pad_t";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_b";
- }
- }
- }
- part { name: "pad_b";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 1.0;
- min: 0 270;
- fixed: 0 1;
- rel1 {
- relative: 0.5 1.0;
- }
- rel2 {
- relative: 0.5 1.0;
- }
- }
- }
- part { name: "elm.swallow.icon1";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- max: 108 108;
- min: 108 108;
- rel1 { relative: 0.21 0.096; offset: 0 0;}
- rel2 { relative: 0.47 0.652; offset: 0 0;}
- }
- }
- part { name: "elm.swallow.icon2";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- max: 108 108;
- min: 108 108;
- rel1 {
- relative: 0.539 0.096;
- }
- rel2 {
- relative: 0.781 0.652;
- }
- }
- }
-#if 0
- part{
- name: "txt1";
- type: TEXT;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- color: 250 250 250 255;
- align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: 0.14 0.652; to: "bg";
- }
- rel2 {
- relative: 0.52 0.778; to: "bg";
- }
- text{
- style: style_txt_2icon;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- //align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt2";
- type: TEXT;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- color: 250 250 250 255;
- align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: 0.519 0.652; to: "bg";
- }
- rel2 {
- relative: 0.821 0.778; to: "bg";
- }
- text{
- style: style_txt_2icon;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
-#endif
- part{
- name: "txt1";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- //align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: (85+67)/720 (26+150)/276; to: "bg";
- }
- rel2 {
- relative: (85+67+190)/720 (26+150+74)/276; to: "bg";
- }
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt2";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- //align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: (118+67+190+8)/720 (26+150)/276; to: "bg";
- }
- rel2 {
- relative: (118+67+190+8+190)/720 (26+150+74)/276; to: "bg";
- }
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
-/* programs {
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon1","elm.swallow.icon1,clicked")
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon2","elm.swallow.icon2,clicked")
- }*/
- }
+ style { name: "naviframe_subtitle_visible_style";
+ base: "font=Samsung Condensed:style=Regular align=center font_size=32 color=#FFFFFFFF wrap=mixed ellipsis=1.0 text_class=tizen";
+ tag: "br" "\n";
+ tag: "tab" "\t";
}
-
-group{ name: "popup_checkview_image_3icons";
- parts {
- part{ name : "bg";
- type: RECT;
- description{
- state: "default" 0.0;
- color: 8 8 8 8;
- }
- }
- part { name: "pad_t";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 0.0;
- min: 0 0;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 0.0;to_x: "pad_r";
- }
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- to_y: "pad_t";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_b";
- }
- }
- }
- part { name: "pad_b";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 1.0;
- min: 0 270;
- fixed: 0 1;
- rel1 {
- relative: 0.5 1.0;
- }
- rel2 {
- relative: 0.5 1.0;
- }
- }
- }
- part { name: "elm.swallow.icon1";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- max: 108 108;
- min: 108 108;
- rel1 { relative: 47/720 20/264; to: "bg";}
- rel2 { relative: (47+190)/720 (20+150)/264; to: "bg";}
- }
- }
- part { name: "elm.swallow.icon2";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- max: 108 108;
- min: 108 108;
- rel1 {
- relative: (47+190+28)/720 20/264;
- to : "bg";
- }
- rel2 {
- relative: (47+190+28+190)/720 (20+150)/264;
- to : "bg";
- }
- }
- }
- part { name: "elm.swallow.icon3";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- max: 108 108;
- min: 108 108;
- rel1 {
- relative: (47+190+28+190+28)/720 20/264;
- to : "bg";
- }
- rel2 {
- relative: (47+190+28+190+28+190)/720 (20+150)/264;
- to : "bg";
- }
- }
- }
-
- part{
- name: "txt1";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- //align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: (47)/720 (20+150)/264; to: "bg";
- }
- rel2 {
- relative: (47+190)/720 (20+150+74)/264; to: "bg";
- }
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt2";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- //align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: (47+190+28)/720 (20+150)/264; to: "bg";
- }
- rel2 {
- relative: (47+190+28+190)/720 (20+150+74)/264; to: "bg";
- }
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt3";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- //align: 0.5 0.5;
- //fixed: 1 1;
- rel1 {
- relative: (47+190+28+190+28)/720 (20+150)/264; to: "bg";
- }
- rel2 {
- relative: (47+190+28+190+28+190)/720 (20+150+74)/264; to: "bg";
- }
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
-/* programs {
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon1","elm.swallow.icon1,clicked")
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon2","elm.swallow.icon2,clicked")
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon3","elm.swallow.icon3,clicked")
- }*/
- }
+ style { name: "naviframe_subtitle_style";
+ base: "font=Samsung Condensed:style=Regular align=center font_size=22 color=#FFFFFFFF wrap=mixed ellipsis=1.0 text_class=tizen";
+ tag: "br" "\n";
+ tag: "tab" "\t";
}
-
-group { name: "popup_gengrid_custom_1line";
- parts {
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 594 264; // (190 + (4*2))*3 (150+37+37) + 20 + 20
- align: 0.5 0.5;
- }
- }
- }
-}
-
-group { name: "popup_gengrid_custom_rotate_1line";
- parts {
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 594 264; // (190 + (4*2))*4 (150+37+37) + 20 + 20
- max: 594 264;
- align: 0.5 0.5;
- }
- }
- }
-}
-
-group { name: "popup_gengrid_custom_2line";
- parts {
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 594 488; // (190 + (4*2))*3 (150+37+37)*2 + 20 + 20
- align: 0.5 0.5;
- }
- }
- }
}
-group { name: "popup_gengrid_custom_rotate_2line";
- parts {
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 594 488; // (190 + (4*2))*4 (150+37+37)*2 + 20 + 20
- max: 594 488;
- align: 0.5 0.5;
- }
- }
- }
-}
- #define T_HEIGHT 37*2
- #define PAD_T 20
- #define PAD_L 47
-
- //#define HEIGHT 96+20+150+37*2+150+37*2+20
- #define HEIGHT 578+4
- #define WIDTH 720
-
- group{ name: "popup_checkview_image_4icons";
- parts {
- part{ name : "bg";
- type: RECT;
- description{
- state: "default" 0.0;
- color: 8 8 8 8;
- }
- }
- part { name: "pad_t";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 0.0;
- min: 0 0;
- fixed: 0 1;
- rel1 {
- relative: 1.0 0.0;to_x: "pad_l";
- }
- rel2 {
- relative: 0.0 0.0;to_x: "pad_r";
- }
- }
- }
- part { name: "pad_l";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part { name: "pad_r";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 0;
- max: 0 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 1.0;
- to_x: "pad_l";
- to_y: "pad_t";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "pad_r";
- to_y: "pad_b";
- }
- }
- }
- part { name: "pad_b";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- align: 0.5 1.0;
- min: 0 450;
- fixed: 0 1;
- rel1 {
- relative: 0.5 1.0;
- }
- rel2 {
- relative: 0.5 1.0;
- }
- }
- }
- part { name: "elm.swallow.icon1";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- //max: 108 108;
- //min: 108 108;
- //rel1 { relative: 47/720 (20+20)/HEIGHT; to: "bg";}
- //rel2 { relative: (47+190)/720 (20+20+150)/HEIGHT; to: "bg";}
- rel1 { relative: (PAD_L)/WIDTH (20)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190)/WIDTH (20+150)/HEIGHT; to: "bg";}
- }
- }
- part { name: "elm.swallow.icon2";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- /*max: 108 108;
- min: 108 108;
- rel1 {
- relative: (47+190+28)/720 (20+20)/HEIGHT;
- to : "bg";
- }
- rel2 {
- relative: (47+190+28+190)/720 (20+20+150)/HEIGHT;
- to : "bg";
- }*/
- rel1 { relative: (PAD_L+190+28)/WIDTH (20)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190+28+190)/WIDTH (20+150)/HEIGHT; to: "bg";}
- }
- }
- part { name: "elm.swallow.icon3";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- /*max: 108 108;
- min: 108 108;
- rel1 {
- relative: (47+190+28+190+28)/720 (20+20)/HEIGHT;
- to : "bg";
- }
- rel2 {
- relative: (47+190+28+190+28+190)/720 (20+20+150)/HEIGHT;
- to : "bg";
- }*/
- rel1 { relative: (PAD_L+190+28+190+28)/WIDTH (20)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190+28+190+28+190)/WIDTH (20+150)/HEIGHT; to: "bg";}
- }
- }
- part { name: "elm.swallow.icon4";
- type: SWALLOW;
- scale: 1;
- mouse_events: 1;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- /*max: 108 108;
- min: 108 108;
- rel1 {
- relative: 47/720 (20++20+20+10+5+150+74+20)/HEIGHT;
- to : "bg";
- }
- rel2 {
- relative: (47+190)/720 (20+20+20+10+5+150+74+20+150)/HEIGHT;
- to : "bg";
- }*/
- rel1 { relative: (PAD_L)/WIDTH (20+150+T_HEIGHT)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190)/WIDTH (20+150+T_HEIGHT+150)/HEIGHT; to: "bg";}
- }
- }
-
- part{
- name: "txt1";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- align: 0.5 0.0;
- //fixed: 1 1;
- /*rel1 {
- relative: (47)/720 (20+20+20+5+150)/HEIGHT; to: "bg";
- }
- rel2 {
- relative: (47+190)/720 (20+20+10+20+5+150+84)/HEIGHT; to: "bg";
- }*/
- rel1 { relative: (PAD_L)/WIDTH (20+150)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190)/WIDTH (20+150+T_HEIGHT)/HEIGHT; to: "bg";}
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt2";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- align: 0.5 0.0;
- //fixed: 1 1;
- /*rel1 {
- relative: (47+190+28)/720 (20+20+20+5+150)/HEIGHT; to: "bg";
- }
- rel2 {
- relative: (47+190+28+190)/720 (20+20+20+5+150+74)/HEIGHT; to: "bg";
- }*/
- rel1 { relative: (PAD_L+190+28)/WIDTH (20+150)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190+28+190)/WIDTH (20+150+T_HEIGHT)/HEIGHT; to: "bg";}
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt3";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- align: 0.5 0.0;
- //fixed: 1 1;
- /*rel1 {
- relative: (47+190+28+190+28)/720 (20+20+20+5+150)/HEIGHT; to: "bg";
- }
- rel2 {
- relative: (47+190+28+190+28+190)/720 (20+20+20+5+150+74)/HEIGHT; to: "bg";
- }*/
- rel1 { relative: (PAD_L+190+28+190+28)/WIDTH (20+150)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190+28+190+28+190)/WIDTH (20+150+T_HEIGHT)/HEIGHT; to: "bg";}
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
- part{
- name: "txt4";
- type: TEXTBLOCK;
- scale: 1;
- mouse_events: 0;
- description{
- state: "default" 0.0;
- //color: 250 250 250 255;
- align: 0.5 0.0;
- //fixed: 1 1;
- /*rel1 {
- relative: 47/720 (20+20+20+20+10+150+84+20+150)/HEIGHT; to: "bg";
- }
- rel2 {
- relative: (47+190)/720 (20+20+20+20+10+150+84+20+150+74)/HEIGHT; to: "bg";
- }*/
- rel1 { relative: (PAD_L)/WIDTH (20+150+T_HEIGHT+150)/HEIGHT; to: "bg";}
- rel2 { relative: (PAD_L+190)/WIDTH (20+150+T_HEIGHT+150+T_HEIGHT)/HEIGHT; to: "bg";}
- text{
- style: style_txt;
- //font: "Tizen:style=Regular";
- //text_class: "tizen";
- //size: 30;
- align: 0.5 0.0;
- }
- }
- }
-/* programs {
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon1","elm.swallow.icon1,clicked")
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon2","elm.swallow.icon2,clicked")
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon3","elm.swallow.icon3,clicked")
- PROGRAM_CLICKED_SIGNAL_EMIT_POPUP("elm.swallow.icon4","elm.swallow.icon4,clicked")
- }*/
- }
- }
-
#define LOCK_TEXT_STYLE "TIZEN_SHADOW"
#define LOCK_TEXT_COLOR 255 255 255 255
#define LOCK_TEXT_COLOR2 0 0 0 0
@@ -888,23 +115,36 @@ group { name: "popup_gengrid_custom_rotate_2line";
#define TAB_BAR_X_OFFSET 35
#define TAB_BAR_Y_OFFSET 4
-group { name: "pagecontrol_layout";
+
+group { name: "main_page_layout";
+ script {
+ public landscape_mode = 0; //Landscape status
+ public prev_btn_visible = 0; //Previous button visible status
+ public title_left_btn_visible = 0; //Title left button visible status
+ public title_right_btn_visible = 0; //Title right button visible status
+ public tabbar_visible = 0; //Tabbar visible status (This value is used for tabbar group)
+ }
+
images {
- image: "Wallpapers_tab_bar.#.png" COMP;
- image: "Wallpapers_tab_bar_ef.#.png" COMP;
+ set {
+ name: "home_wallpapaer_title_bg";
+ image {
+ image: "icons/home_wallpapaer_title_bg.#.png" RAW;
+ }
+ }
}
+
parts {
part { name: "bg";
type: RECT;
- scale: 1;
description { state: "default" 0.0;
color: 0 0 0 255;
}
}
- part { name: "scroller";
+ part { name: "preview_image";
type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
+ description {
+ state: "default" 0.0;
rel1 {
relative: 0.0 0.0;
to: "bg";
@@ -916,378 +156,378 @@ group { name: "pagecontrol_layout";
align: 0.5 0.5;
}
}
+ part { name: "clipper";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 1;
+ }
+ description { state: "hidden" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "title_bg";
+ //type: RECT;
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "title_clipper";
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_TITLE_HEIGHT_INC;
+ max: -1 NAVIFRAME_TITLE_HEIGHT_INC;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1 { to: "bg"; relative: 0.0 0.0; }
+ rel2 { to: "bg"; relative: 1.0 0.0; }
+ image.normal: "icons/home_wallpapaer_title_bg.#.png";
+ visible: 1;
+ color: 0 0 0 255;
+ map.on: 1;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ min: 0 0;
+ max: -1 0;
+ }
+ }
+ part { name: "title_clipper";
+ type: RECT;
+ mouse_events: 0;
+ clip_to: "clipper";
+ description { state: "default" 0.0;
+ rel1.to_y: "title_bg";
+ rel2.to_y: "title_bg";
+ //color: 255 255 255 255;
+ color: 255 255 255 255;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "title_text_left_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "title_bg";
+ rel2.to: "title_left_btn_right_padding";
+ }
+ }
+ part { name: "title_text_right_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ rel1.to: "title_right_btn_left_padding";
+ rel2.to: "title_bg";
+ }
+ }
+ part { name: "elm.text.title";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 0;
+ effect: TIZEN_GLOW_SHADOW;
+ clip_to: "title_text_clipper";
+ description { state: "default" 0.0;
+ text { style: "naviframe_title_style";}
+ fixed: 1 1;
+ rel1 { to_x: "title_text_left_padding"; to_y: "title_bg"; relative: 1.0 0.0; }
+ rel2 { to_x: "title_text_right_padding"; to_y: "title_bg"; relative: 0.0 1.0; }
+ color : 255 255 255 255;
+ color2: 0 0 0 255;
+ color3: 0 0 0 255;
+ }
+ description { state: "subtitle_visible" 0.0;
+ text { style: "naviframe_subtitle_visible_style";}
+ fixed: 1 1;
+ rel1 { to_x: "title_text_left_padding"; to_y: "title_top_padding"; relative: 1.0 1.0; }
+ rel2 { to_x: "title_text_right_padding"; to_y: "elm.text.subtitle"; relative: 0.0 0.0; }
+ }
+ }
+ part { name: "title_text_clipper";
+ type: RECT;
+ mouse_events: 0;
+ clip_to: "title_clipper";
+ description { state: "default" 0.0;
+ rel1.to: "elm.text.title";
+ rel2.to: "elm.text.title";
+ }
+ }
+ part { name: "title_top_padding";
+ type: SPACER;
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_TITLE_TOP_PADDING_HEIGHT_INC;
+ max: -1 NAVIFRAME_TITLE_TOP_PADDING_HEIGHT_INC;
+ fixed: 0 1;
+ align: 0.5 0.0;
+ rel1 { to: "title_bg"; relative: 0.0 0.0; }
+ rel2 { to: "title_bg"; relative: 1.0 0.0; }
+ }
+ }
+ part { name: "elm.text.subtitle";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 0;
+ clip_to: "subtitle_text_clipper";
+ description { state: "default" 0.0;
+ text { style: "naviframe_subtitle_style";}
+ min: 0 NAVIFRAME_SUBTITLE_HEIGHT_INC;
+ max: -1 NAVIFRAME_SUBTITLE_HEIGHT_INC;
+ fixed: 0 1;
+ align: 0.5 1.0;
+ rel1 { to_x: "title_left_btn_right_padding"; to_y: "subtitle_bottom_padding"; relative: 1.0 0.0; }
+ rel2 { to_x: "title_right_btn_left_padding"; to_y: "subtitle_bottom_padding"; relative: 0.0 0.0; }
+ }
+ }
+ part { name: "subtitle_text_clipper";
+ type: RECT;
+ mouse_events: 0;
+ clip_to: "title_clipper";
+ description { state: "default" 0.0;
+ rel1.to: "elm.text.subtitle";
+ rel2.to: "elm.text.subtitle";
+ }
+ }
+ part { name: "subtitle_bottom_padding";
+ type: SPACER;
+ description { state: "default" 0.0;
+ min: 0 NAVIFRAME_SUBTITLE_BOTTOM_PADDING_HEIGHT_INC;
+ max: -1 NAVIFRAME_SUBTITLE_BOTTOM_PADDING_HEIGHT_INC;
+ fixed: 0 1;
+ align: 0.5 1.0;
+ rel1 { to: "title_bg"; relative: 0.0 1.0; }
+ rel2 { to: "title_bg"; relative: 1.0 1.0; }
+ }
+ }
+ part { name: "click_event_area";
+ type: RECT;
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ rel1.to: "title_bg";
+ rel2.to: "title_bg";
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "access.title";
+ type: RECT;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ rel1.to: "title_bg";
+ rel2.to: "title_bg";
+ color: 0 0 0 0;
+ }
+ }
+ part { name: "elm.swallow.icon";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clipper";
+ description { state: "default" 0.0;
+ max: 0 0;
+ fixed: 1 0;
+ align: 0.0 0.5;
+ rel1 { relative: 1.0 0.0; to: "title_left_btn_right_padding"; }
+ rel2 { relative: 1.0 1.0; to: "title_left_btn_right_padding"; }
+ visible: 0;
+ }
+ }
+ part { name: "title_left_btn_left_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC 0;
+ max: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC -1;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ rel1 { to: "title_bg"; relative: 0.0 0.0; }
+ rel2 { to: "title_bg"; relative: 0.0 1.0; }
+ }
+ }
+ part { name: "title_left_btn_bg";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 1;
+ align: 0.0 0.5;
+ rel1 { to: "title_left_btn_left_padding"; relative: 1.0 0.0; }
+ rel2 { to: "title_left_btn_left_padding"; relative: 1.0 1.0; }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ }
+ }
+ part { name: "title_left_btn_right_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ rel1 { to: "title_left_btn_bg"; relative: 1.0 0.0; }
+ rel2 { to: "title_left_btn_bg"; relative: 1.0 1.0; }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC 0;
+ max: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC -1;
+ }
+ }
+ part { name: "title_left_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clipper";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "title_left_btn_bg";
+ rel2.to: "title_left_btn_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part { name: "title_right_btn_left_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 1;
+ align: 1.0 0.0;
+ rel1 { to: "title_right_btn_bg"; relative: 0.0 0.0; }
+ rel2 { to: "title_right_btn_bg"; relative: 0.0 1.0; }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC 0;
+ max: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC -1;
+ }
+ }
+ part { name: "title_right_btn_bg";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 0 0;
+ fixed: 1 1;
+ align: 1.0 0.5;
+ rel1 { to: "title_right_btn_right_padding"; relative: 0.0 0.0; }
+ rel2 { to: "title_right_btn_right_padding"; relative: 0.0 1.0; }
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ min: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+ }
+ }
+ part { name: "title_right_btn_right_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC 0;
+ max: NAVIFRAME_TITLE_LEFT_PADDING_WIDTH_INC -1;
+ fixed: 1 1;
+ align: 1.0 0.0;
+ rel1 { to: "title_bg"; relative: 1.0 0.0; }
+ rel2 { to: "title_bg"; relative: 1.0 1.0; }
+ }
+ }
+ part { name: "title_right_btn";
+ type: SWALLOW;
+ scale: 1;
+ clip_to: "title_clipper";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "title_right_btn_bg";
+ rel2.to: "title_right_btn_bg";
+ visible: 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ part { name: "prev_btn_left_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 8 0;
+ max: 8 -1;
+ align: 0.0 0.0;
+ fixed: 1 1;
+ rel1 { to: "title_bg"; relative: 0.0 0.0; }
+ rel2 { to: "title_bg"; relative: 0.0 1.0; }
+ }
+ }
+ part { name: "elm.swallow.prev_btn";
+ type: SWALLOW;
+ clip_to: "title_clipper";
+ scale: 1;
+ description { state: "default" 0.0;
+ min: BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC;
+ max: BUTTON_NAVIFRAME_BACK_BUTTON_SIZE_INC;
+ align: 0.0 0.5;
+ fixed: 1 1;
+ rel1 { to: "prev_btn_left_padding"; relative: 1.0 0.0; }
+ rel2 { to: "prev_btn_left_padding"; relative: 1.0 1.0; }
+ visible: 1;
+ }
+ description { state: "hidden" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ part { name: "prev_btn_right_padding";
+ type: SPACER;
+ scale: 1;
+ description { state: "default" 0.0;
+ min: 8 0;
+ max: 8 -1;
+ align: 0.0 0.0;
+ fixed: 1 1;
+ rel1 { to: "elm.swallow.prev_btn"; relative: 1.0 0.0; }
+ rel2 { to: "elm.swallow.prev_btn"; relative: 1.0 1.0; }
+ }
+ }
+
part {
- name: "cliper1";
- type: RECT;
- scale: 1;
- mouse_events: 1;
- repeat_events: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: 15/480 0/720; to: "bg"; }
- rel2 { relative: (15+225)/480 105/720; to: "bg";}
- color: 0 0 0 0;
- }
- }
- part {
- name: "cliper2";
+ name: "controlbar_area";
type: RECT;
- scale: 1;
- mouse_events: 1;
- repeat_events: 1;
+ scale : 1;
+ mouse_events:0;
description {
state: "default" 0.0;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: (15+225)/480 0/720; to: "bg"; }
- rel2 { relative: (480-15)/480 105/720; to: "bg";}
+ rel1{ relative : 0.0 1.0; }
+ rel2{ relative : 1.0 1.0; }
+ fixed: 0 1;
+ align: 0.5 1.0;
color: 0 0 0 0;
+ visible : 1;
}
}
- part { name: "page_lockscreen_icon";
- mouse_events: 1;
- repeat_events: 1;
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 40 40;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: (15+97)/480 16/720; to: "bg";}
- rel2 { relative: (15+97+40)/480 (16+40)/720; to: "bg";}
- align: 0.0 0.5;
- }
- }
- part { name: "text_lock";
+ part { name: "text_tap";
type: TEXTBLOCK;
effect : "TIZEN_SHADOW";
- mouse_events: 1;
- repeat_events: 1;
scale: 1;
- description {
- state: "default" 0.0;
- color : LOCK_TEXT_COLOR;
- color2 : LOCK_TEXT_COLOR2;
- color3 : LOCK_TEXT_COLOR3;
- fixed:1 1;
- visible: 1;
- rel1 { relative: (15+TAB_BAR_X_OFFSET)/480 (16+40)/720; to: "bg";}
- rel2 { relative: (15+TAB_BAR_X_OFFSET+164)/480 (16+40+28)/720; to: "bg";}
- text {
- style: style_default_and_gallery;
- min : 0 1;
- max: 1 0;
- align : 0.5 0.5;
- }
- }
- }
- part { name: "lock_bar_ef";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- rel1 {
- to: "text_lock";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "text_lock";
- relative: 1.0 1.0;
- }
- image {
- normal: "Wallpapers_tab_bar_ef.#.png";
- }
- image.middle: 1;
- fixed: 0 1;
- min: 0 7;
- align: 0.5 0.0;
- visible: 1;
- }
- description { state: "dim" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "lock_bar";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- rel1 {
- to: "text_lock";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "text_lock";
- relative: 1.0 1.0;
- }
- image {
- normal: "Wallpapers_tab_bar.#.png";
- }
- image.middle: 1;
- fixed: 0 1;
- min: 0 7;
- align: 0.5 0.0;
- visible: 1;
- color_class: "AO024";
- }
- description { state: "dim" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "page_home_icon";
mouse_events: 1;
repeat_events: 1;
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 40 40;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: (15+225+88)/480 16/720; to: "bg";}
- rel2 { relative: (15+225+88+40)/480 (16+40)/720; to: "bg";}
- align: 0.0 0.5;
- }
- }
- part { name: "text_home";
- type: TEXTBLOCK;
- effect : "TIZEN_SHADOW";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
description {
state: "default" 0.0;
- color : LOCK_TEXT_COLOR;
- color2 : LOCK_TEXT_COLOR2;
- color3 : LOCK_TEXT_COLOR3;
- fixed:1 1;
visible: 1;
- rel1 { relative: (15+225+26)/480 (16+40)/720; to: "bg";}
- rel2 { relative: (15+225+26+164)/480 (16+40+28)/720; to: "bg";}
+ rel1 { relative: 0.0 (720-456+36+14)/720; to: "bg";}
+ rel2 { relative: 1.0 (720-456+36+14+36)/720; to: "bg";}
text {
- style: style_default_and_gallery;
- min : 0 1;
- max: 1 0;
+ style: style_text_tap;
align : 0.5 0.5;
}
}
- }
- part { name: "home_bar_ef";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- rel1 {
- to: "text_home";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "text_home";
- relative: 1.0 1.0;
- }
- image {
- normal: "Wallpapers_tab_bar_ef.#.png";
- }
- image.middle: 1;
- fixed: 0 1;
- min: 0 7;
- align: 0.5 0.0;
- visible: 1;
- }
- description { state: "dim" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "home_bar";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- rel1 {
- to: "text_home";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "text_home";
- relative: 1.0 1.0;
- }
- image {
- normal: "Wallpapers_tab_bar.#.png";
- }
- image.middle: 1;
- fixed: 0 1;
- min: 0 7;
- align: 0.5 0.0;
- visible: 1;
- color_class: "AO024";
- }
- description { state: "dim" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
- programs{
- program {
- name: "page_home_icon_clicked";
- signal: "mouse,clicked,1";
- source: "page_home_icon";
- action: SIGNAL_EMIT "page_home_icon_clicked" "edj";
- }
- program {
- name: "page_lockscreen_icon_clicked";
- signal: "mouse,clicked,1";
- source: "page_lockscreen_icon";
- action: SIGNAL_EMIT "page_lockscreen_icon_clicked" "edj";
- }
- program {
- name: "cliper1_clicked";
- signal: "mouse,clicked,1";
- source: "cliper1";
- action: SIGNAL_EMIT "cliper1_clicked" "edj";
- after: "text_lock_default";
- after: "text_home_dim";
- after: "lock_bar_default";
- after: "lock_bar_ef_default";
- after: "home_bar_dim";
- after: "home_bar_ef_dim";
- }
- program {
- name: "cliper2_clicked";
- signal: "mouse,clicked,1";
- source: "cliper2";
- action: SIGNAL_EMIT "cliper2_clicked" "edj";
- after: "text_lock_dim";
- after: "text_home_default";
- after: "lock_bar_dim";
- after: "lock_bar_ef_dim";
- after: "home_bar_default";
- after: "home_bar_ef_default";
- }
- program {
- name: "text_home_default";
- signal: "text_home_default";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "text_home";
- }
- program {
- name: "text_home_dim";
- signal: "text_home_dim";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "text_home";
- }
- program {
- name: "text_lock_default";
- signal: "text_lock_default";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "text_lock";
- }
- program {
- name: "text_lock_dim";
- signal: "text_lock_dim";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "text_lock";
- }
- program {
- name: "home_bar_default";
- signal: "home_bar_default";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "home_bar";
- }
- program {
- name: "home_bar_dim";
- signal: "home_bar_dim";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "home_bar";
- }
- program {
- name: "home_bar_ef_default";
- signal: "home_bar_ef_default";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "home_bar_ef";
- }
- program {
- name: "home_bar_ef_dim";
- signal: "home_bar_ef_dim";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "home_bar_ef";
- }
- program {
- name: "lock_bar_default";
- signal: "lock_bar_default";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "lock_bar";
- }
- program {
- name: "lock_bar_dim";
- signal: "lock_bar_dim";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "lock_bar";
- }
- program {
- name: "lock_bar_ef_default";
- signal: "lock_bar_ef_default";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "lock_bar_ef";
- }
- program {
- name: "lock_bar_ef_dim";
- signal: "lock_bar_ef_dim";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "lock_bar_ef";
- }
- }
-}
-
-group { name: "preview_pagecontrol_layout";
- parts {
- part { name: "bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- color: 0 0 0 255;
- }
- }
- part { name: "scroller";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- rel1 {
- relative: 0.0 0.0;
- to: "bg";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "bg";
- }
- align: 0.5 0.5;
+ description {
+ state : "hidden" 0.0;
+ visible : 0;
}
- }
- part {
- name: "controlbar_area";
- type: RECT;
- scale : 1;
- mouse_events:0;
description {
- state: "default" 0.0;
- min : 0 NAVIFRAME_TOOLBAR_HEIGHT_INC;
- fixed : 0 1;
- rel1{ relative : 0.0 1.0; }
- rel2{ relative : 1.0 1.0; }
- align: 0.5 1.0;
- color: 0 0 0 0;
+ state : "show" 0.0;
visible : 1;
}
}
@@ -1299,7 +539,6 @@ group { name: "preview_pagecontrol_layout";
repeat_events: 0;
description {
state: "default" 0.0;
- min: 0 136;
fixed: 0 1;
rel1 { to_y: "controlbar_area"; relative: 0.0 0.0; }
rel2 { to_y: "controlbar_area"; relative: 1.0 0.0; }
@@ -1315,6 +554,7 @@ group { name: "preview_pagecontrol_layout";
repeat_events: 0;
description {
state: "default" 0.0;
+ min: 0 195;
rel1 { to: "thumblist_bg"; }
rel2 { to: "thumblist_bg"; }
color: 0 0 0 0;
@@ -1327,7 +567,6 @@ group { name: "preview_pagecontrol_layout";
scale: 1;
description { state: "default" 0.0;
min: 15 15;
- fixed: 1 1;
visible: 0;
rel1 { relative: 1.0 0.0; to: "bg";}
rel2 { relative: 1.0 0.0; to: "bg";}
@@ -1337,947 +576,259 @@ group { name: "preview_pagecontrol_layout";
part {
name: "cliper";
type: RECT;
- scale: 1;
mouse_events: 1;
repeat_events: 1;
description {
+ min: 0 145;
state: "default" 0.0;
- fixed: 1 1;
visible: 1;
rel1 { relative: 380/480 5/720; to: "bg"; }
rel2 { relative: 470/480 100/720; to: "bg";}
color: 0 0 0 0;
}
}
- part { name: "preview_icon_part";
- type: TEXTBLOCK;
- effect : "TIZEN_SHADOW";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- color : LOCK_TEXT_COLOR;
- color2 : LOCK_TEXT_COLOR2;
- color3 : LOCK_TEXT_COLOR3;
- fixed:1 1;
- visible: 1;
- rel1 { relative: 380/480 15/720; to: "bg"; }
- rel2 { relative: 470/480 55/720; to: "bg";}
- text {
- style: style_default_and_gallery;
- min : 0 1;
- align : 1 0.5;
- }
- }
- description {
- state: "dim" 0.0;
- color : LOCK_TEXT_COLOR_DIM;
- color2 : LOCK_TEXT_COLOR2_DIM;
- color3 : LOCK_TEXT_COLOR3_DIM;
- fixed:1 1;
- visible: 1;
- rel1 { relative: 380/480 15/720; to: "bg";}
- rel2 { relative: 470/480 55/720; to: "bg";}
- text {
- style: style_default_and_gallery_dim;
- min : 0 1;
- align : 1 0.5;
- }
- }
- }
}
programs{
+ /* preview */
program {
- name: "cliper_clicked";
- signal: "mouse,clicked,1";
- source: "cliper";
- action: SIGNAL_EMIT "cliper_clicked" "edj";
- }
- program {
- name: "cliper_clicked_down";
- signal: "mouse,down,1";
- source: "cliper";
- after: "preview_icon_part_dim";
+ name : "show_preview";
+ signal : "show_preview";
+ source : "preview_image";
+ action : STATE_SET "default" 0.0;
+ target : "text_tap";
}
program {
- name: "cliper_clicked_up";
- signal: "mouse,up,1";
- source: "cliper";
- after: "preview_icon_part_default";
+ name : "hide_preview";
+ signal : "hide_preview";
+ source : "preview_image";
+ action : STATE_SET "hidden" 0.0;
+ target : "text_tap";
}
- program {
- name: "preview_icon_part_dim";
- signal: "preview_icon_part_dim";
+ program { name: "content_new_pushed";
+ signal: "elm,state,new,pushed,deferred";
source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "preview_icon_part";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ transition: SIN_FAC NAVIFRAME_VIEW_PUSH_TRANS_TIME 1.7;
+ after: "show_finished";
}
- program {
- name: "preview_icon_part_default";
- signal: "preview_icon_part_default";
+ program { name: "content_cur_pushed";
+ signal: "elm,state,cur,pushed,deferred";
source: "elm";
action: STATE_SET "default" 0.0;
- target: "preview_icon_part";
- }
- }
-}
-
-group { name: "pagecontrol_page_layout";
- parts {
- part { name: "page";
- type: SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- }
- }
- }
-}
-
-group { name: "pagecontrol_preview_page_layout";
- parts {
- part { name: "bg";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- }
- }
- part {
- name: "cliper";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- part { name: "page";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- clip_to: "cliper";
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
- }
- }
-
- programs{
- program {
- name: "preview_clicked";
- signal: "mouse,clicked,1";
- source: "page";
- action: SIGNAL_EMIT "preview_clicked" "edj";
- }
- }
-}
-
-group { name: "wallpaper_page_layout";
-
- images {
- image: "set_thumbnail_focus.#.png" COMP;
- image: "set_thumbnail_focus_ef.#.png" COMP;
- }
-
- parts {
- part { name: "bg";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- }
- }
- part {
- name: "cliper";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- part { name: "bg_image";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- clip_to: "cliper";
- description { state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
+ target: "clipper";
+ transition: SIN_FAC NAVIFRAME_VIEW_PUSH_TRANS_TIME 1.7;
+ after: "pushed_finished";
}
- part { name: "text_tap";
- type: TEXTBLOCK;
- effect : "TIZEN_SHADOW";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed:1 1;
- visible: 1;
- rel1 { relative: 0.0 (720-456+36+14)/720; to: "bg";}
- rel2 { relative: 1.0 (720-456+36+14+36)/720; to: "bg";}
- text {
- style: style_default_and_gallery;
- align : 0.5 0.0;
- }
- }
- }
- part { name: "page_default_wallpaper_icon";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- min: 141 141;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: 0.5 1.0; to: "bg";}
- rel2 { relative: 0.5 1.0; to: "bg";}
- align: 0.5 1.0;
- }
- }
- part { name: "page_gallery_icon";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- min: 141 141;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: 240/480 1.0; to: "bg";}
- rel2 { relative: 240/480 1.0; to: "bg";}
- align: 0.0 1.0;
- }
- }
- part {
- name : "page_default_wallpaper_icon_focus_bg_ef";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_default_wallpaper_icon";
- rel2.to : "page_default_wallpaper_icon";
- image.normal: "set_thumbnail_focus_ef.#.png";
- }
- }
- part {
- name : "page_default_wallpaper_icon_focus_bg";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_default_wallpaper_icon";
- rel2.to : "page_default_wallpaper_icon";
- image.normal: "set_thumbnail_focus.#.png";
- }
- }
- part {
- name : "page_gallery_icon_focus_bg_ef";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_gallery_icon";
- rel2.to : "page_gallery_icon";
- image.normal: "set_thumbnail_focus_ef.#.png";
- }
+ program { name: "content_prev_popped";
+ signal: "elm,state,prev,popped,deferred";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ transition: SIN_FAC NAVIFRAME_VIEW_POP_TRANS_TIME 1.7;
+ after: "show_finished";
}
- part {
- name : "page_gallery_icon_focus_bg";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_gallery_icon";
- rel2.to : "page_gallery_icon";
- image.normal: "set_thumbnail_focus.#.png";
- }
+ program { name: "content_cur_popped";
+ signal: "elm,state,cur,popped,deferred";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
+ transition: SIN_FAC NAVIFRAME_VIEW_POP_TRANS_TIME 1.7;
+ after: "popped_finished";
}
- }
- programs{
- program {
- name: "page_clicked";
- signal: "mouse,clicked,1";
- source: "bg_image";
- action: SIGNAL_EMIT "page_clicked" "edj";
+ program { name: "new_pushed";
+ signal: "elm,state,new,pushed";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "clipper";
}
-
- /* default selected */
- program {
- name : "default_icon_selected";
- signal : "default_icon_selected";
- source : "bg";
- action : STATE_SET "selected" 0.0;
- target : "page_default_wallpaper_icon_focus_bg_ef";
- target : "page_default_wallpaper_icon_focus_bg";
- after : "default_icon_selected_after";
+ program { name: "prev_popped";
+ signal: "elm,state,prev,popped";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
}
- program {
- name : "default_icon_selected_after";
- action : STATE_SET "default" 0.0;
- target : "page_gallery_icon_focus_bg_ef";
- target : "page_gallery_icon_focus_bg";
+ program { name: "show_finished";
+ action: SIGNAL_EMIT "elm,action,show,finished" "";
}
- /* gallery selected */
- program {
- name : "gallery_icon_selected";
- signal : "gallery_icon_selected";
- source : "bg";
- action : STATE_SET "selected" 0.0;
- target : "page_gallery_icon_focus_bg_ef";
- target : "page_gallery_icon_focus_bg";
- after : "gallery_icon_selected_after";
+ program { name: "pushed_finished";
+ action: SIGNAL_EMIT "elm,action,pushed,finished" "";
}
- program {
- name : "gallery_icon_selected_after";
- action : STATE_SET "default" 0.0;
- target : "page_default_wallpaper_icon_focus_bg_ef";
- target : "page_default_wallpaper_icon_focus_bg";
+ program { name: "popped_finished";
+ action: SIGNAL_EMIT "elm,action,popped,finished" "";
}
- }
-}
-
-
-group { name: "wallpaper_page_lock_layout";
-
- images {
- image: "set_thumbnail_focus.#.png" COMP;
- image: "set_thumbnail_focus_ef.#.png" COMP;
- }
-
- parts {
- part { name: "bg";
- type: RECT;
- mouse_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 1;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- }
- }
- part {
- name: "cliper";
- type: RECT;
- scale: 1;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0; to: "bg"; }
- rel2 { relative: 1.0 1.0; to: "bg"; }
- }
- }
- part { name: "bg_image";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- clip_to: "cliper";
- description { state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- }
- }
- /*part { name: "text_help";
- type: TEXTBLOCK;
- effect : "TIZEN_SHADOW";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed:1 1;
- visible: 1;
- rel1 { relative: 0.0 (720-456)/720; to: "bg";}
- rel2 { relative: 1.0 (720-456+36)/720; to: "bg";}
- text {
- style: style_default_and_gallery;
- align : 0.5 0.0;
- }
- }
- }*/
- part { name: "text_tap";
- type: TEXTBLOCK;
- effect : "TIZEN_SHADOW";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed:1 1;
- visible: 1;
- rel1 { relative: 0.0 (720-456+36+14)/720; to: "bg";}
- rel2 { relative: 1.0 (720-456+36+14+36)/720; to: "bg";}
- text {
- style: style_default_and_gallery;
- align : 0.5 0.0;
- }
- }
- description {
- state : "hidden" 0.0;
- visible : 0;
- }
- }
- part { name: "page_right_top_padding";
- type: RECT;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description { state: "default" 0.0;
- min: 182 12;
- fixed: 1 1;
- visible: 0;
- rel1 { relative: 1.0 0.0; to: "bg_image";}
- rel2 { relative: 1.0 0.0; to: "bg_image";}
- align: 1.0 0.0;
- }
- }
- part { name: "page_lockscreen_icon";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 46 46;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: 0.0 1.0; to: "page_right_top_padding";}
- rel2 { relative: 0.0 1.0; to: "page_right_top_padding";}
- align: 1.0 0.0;
- }
- }
- part { name: "page_lockscreen_and_home_spacer";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: 24 46;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0; to: "page_lockscreen_icon";}
- rel2 { relative: 0.0 0.0; to: "page_lockscreen_icon";}
- align: 1.0 0.0;
- }
+ program { name: "visible";
+ signal: "elm,state,visible";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "clipper";
}
- part { name: "page_home_icon";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: 46 46;
- fixed: 1 1;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "page_lockscreen_and_home_spacer";}
- rel2 { relative: 0.0 0.0; to: "page_lockscreen_and_home_spacer";}
- align: 1.0 0.0;
- }
+ program { name: "invisible";
+ signal: "elm,state,invisible";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "clipper";
}
- part { name: "page_default_wallpaper_icon";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- min: 141 141;
- fixed: 1 1;
- rel1 { relative: 0.5 0.5; to: "page_gallery_icon";}
- rel2 { relative: 0.5 0.5; to: "page_gallery_icon";}
- align: 0.5 0.5;
+ program { name: "title_show";
+ signal: "elm,state,title,show";
+ source: "elm";
+ script {
+ set_state(PART:"title_bg", "default", 0.0);
+ set_state(PART:"title_clipper", "default", 0.0);
+ if (get_int(title_left_btn_visible)) {
+ set_state(PART:"title_left_btn_bg", "visible", 0.0);
+ set_state(PART:"title_left_btn_right_padding", "visible", 0.0);
+ set_state(PART:"title_left_btn", "visible", 0.0);
+ }
+ else if (get_int(prev_btn_visible))
+ set_state(PART:"elm.swallow.prev_btn", "default", 0.0);
+ if (get_int(title_right_btn_visible)) {
+ set_state(PART:"title_right_btn_bg", "visible", 0.0);
+ set_state(PART:"title_right_btn_left_padding", "visible", 0.0);
+ set_state(PART:"title_right_btn", "visible", 0.0);
+ }
+ }
+ }
+ program { name: "title_show_trans";
+ signal: "elm,action,title,show";
+ source: "elm";
+ after: "title_show";
}
+ program { name: "title_hide";
+ signal: "elm,state,title,hide";
+ source: "elm";
+ script {
+ set_state(PART:"title_bg", "hidden", 0.0);
+ set_state(PART:"title_clipper", "hidden", 0.0);
+ set_state(PART:"title_left_btn_bg", "default", 0.0);
+ set_state(PART:"title_left_btn_right_padding", "default", 0.0);
+ set_state(PART:"title_left_btn", "default", 0.0);
+ set_state(PART:"title_right_btn_bg", "default", 0.0);
+ set_state(PART:"title_right_btn_left_padding", "default", 0.0);
+ set_state(PART:"title_right_btn", "default", 0.0);
+ set_state(PART:"elm.swallow.prev_btn", "hidden", 0.0);
+ }
+ }
+ program { name: "title_hide_trans";
+ signal: "elm,action,title,hide";
+ source: "elm";
+ after: "title_hide";
}
- part { name: "page_my_interests_icon";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- min: 141 141;
- fixed: 1 1;
- rel1 { relative: 1.0 0.5; to: "page_gallery_icon";}
- rel2 { relative: 1.0 0.5; to: "page_gallery_icon";}
- align: 0.0 0.5;
+ program { name: "subtitle_show";
+ signal: "elm,state,subtitle,show";
+ source: "elm";
+ script {
+ set_state(PART:"elm.text.title", "subtitle_visible", 0.0);
}
}
- part { name: "page_gallery_icon";
- type: SWALLOW;
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- fixed: 1 1;
- min: 141 141;
- align : 0.5 1.0;
- fixed: 1 1;
- rel1 { relative: 0.5 1.0; to: "bg";}
- rel2 { relative: 0.5 1.0; to: "bg";}
-
+ program { name: "subtitle_hide";
+ signal: "elm,state,subtitle,hide";
+ source: "elm";
+ script {
+ set_state(PART:"elm.text.title", "default", 0.0);
}
}
-
- part {
- name : "page_default_wallpaper_icon_focus_bg_ef";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_default_wallpaper_icon";
- rel2.to : "page_default_wallpaper_icon";
- image.normal: "set_thumbnail_focus_ef.#.png";
+ program { name: "prev_btn_show";
+ signal: "elm,state,prev_btn,show";
+ source: "elm";
+ script {
+ set_state(PART:"elm.swallow.prev_btn", "default", 0.0);
+ set_int(prev_btn_visible, 1);
}
}
- part {
- name : "page_default_wallpaper_icon_focus_bg";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_default_wallpaper_icon";
- rel2.to : "page_default_wallpaper_icon";
- image.normal: "set_thumbnail_focus.#.png";
+ program { name: "prev_btn_hide";
+ signal: "elm,state,prev_btn,hide";
+ source: "elm";
+ script {
+ set_state(PART:"elm.swallow.prev_btn", "hidden", 0.0);
+ set_int(prev_btn_visible, 0);
}
}
- part {
- name : "page_gallery_icon_focus_bg_ef";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_gallery_icon";
- rel2.to : "page_gallery_icon";
- image.normal: "set_thumbnail_focus_ef.#.png";
+ program { name: "title_left_btn_show";
+ signal: "elm,state,title_left_btn,show";
+ source: "elm";
+ script {
+ set_state(PART:"title_left_btn_bg", "visible", 0.0);
+ set_state(PART:"title_left_btn_right_padding", "visible", 0.0);
+ set_state(PART:"title_left_btn", "visible", 0.0);
+ set_state(PART:"elm.swallow.prev_btn", "hidden", 0.0);
+ set_int(title_left_btn_visible, 1);
+ set_int(prev_btn_visible, 0);
}
}
- part {
- name : "page_gallery_icon_focus_bg";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_gallery_icon";
- rel2.to : "page_gallery_icon";
- image.normal: "set_thumbnail_focus.#.png";
+ program { name: "title_left_btn_hide";
+ signal: "elm,state,title_left_btn,hide";
+ source: "elm";
+ script {
+ set_state(PART:"title_left_btn_bg", "default", 0.0);
+ set_state(PART:"title_left_btn_right_padding", "default", 0.0);
+ set_state(PART:"title_left_btn", "default", 0.0);
+ set_int(title_left_btn_visible, 0);
+ set_state(PART:"elm.swallow.prev_btn", "default", 0.0);
+ set_int(prev_btn_visible, 1);
}
}
- part {
- name : "page_my_interests_icon_focus_bg_ef";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_my_interests_icon";
- rel2.to : "page_my_interests_icon";
- image.normal: "set_thumbnail_focus_ef.#.png";
+ program { name: "title_right_btn_show";
+ signal: "elm,state,title_right_btn,show";
+ source: "elm";
+ script {
+ set_state(PART:"title_right_btn_bg", "visible", 0.0);
+ set_state(PART:"title_right_btn_left_padding", "visible", 0.0);
+ set_state(PART:"title_right_btn", "visible", 0.0);
+ set_int(title_right_btn_visible, 1);
}
}
- part {
- name : "page_my_interests_icon_focus_bg";
- type : IMAGE;
- repeat_events : 1;
- description {
- state : "default" 0.0;
- visible : 0;
- }
- description {
- state : "selected" 0.0;
- rel1.to : "page_my_interests_icon";
- rel2.to : "page_my_interests_icon";
- image.normal: "set_thumbnail_focus.#.png";
+ program { name: "title_right_btn_hide";
+ signal: "elm,state,title_right_btn,hide";
+ source: "elm";
+ script {
+ set_state(PART:"title_right_btn_bg", "default", 0.0);
+ set_state(PART:"title_right_btn_left_padding", "default", 0.0);
+ set_state(PART:"title_right_btn", "default", 0.0);
+ set_int(title_right_btn_visible, 0);
}
}
- }
- programs{
- program {
- name: "page_clicked";
+ program { name: "title_clicked";
signal: "mouse,clicked,1";
- source: "bg_image";
- action: SIGNAL_EMIT "page_clicked" "edj";
- }
-
- /* default selected */
- program {
- name : "default_icon_selected";
- signal : "default_icon_selected";
- source : "bg";
- action : STATE_SET "selected" 0.0;
- target : "page_default_wallpaper_icon_focus_bg_ef";
- target : "page_default_wallpaper_icon_focus_bg";
- after : "default_icon_selected_after";
- }
- program {
- name : "default_icon_selected_after";
- action : STATE_SET "default" 0.0;
- target : "page_gallery_icon_focus_bg_ef";
- target : "page_gallery_icon_focus_bg";
- target : "page_my_interests_icon_focus_bg_ef";
- target : "page_my_interests_icon_focus_bg";
- }
- /* gallery selected */
- program {
- name : "gallery_icon_selected";
- signal : "gallery_icon_selected";
- source : "bg";
- action : STATE_SET "selected" 0.0;
- target : "page_gallery_icon_focus_bg_ef";
- target : "page_gallery_icon_focus_bg";
- after : "gallery_icon_selected_after";
- }
- program {
- name : "gallery_icon_selected_after";
- action : STATE_SET "default" 0.0;
- target : "page_default_wallpaper_icon_focus_bg_ef";
- target : "page_default_wallpaper_icon_focus_bg";
- target : "page_my_interests_icon_focus_bg_ef";
- target : "page_my_interests_icon_focus_bg";
- }
- /* my interest selected */
- program {
- name : "my_interests_icon_selected";
- signal : "my_interests_icon_selected";
- source : "bg";
- action : STATE_SET "selected" 0.0;
- target : "page_my_interests_icon_focus_bg_ef";
- target : "page_my_interests_icon_focus_bg";
- after : "my_interests_icon_selected_after";
- }
- program {
- name : "my_interests_icon_selected_after";
- action : STATE_SET "default" 0.0;
- target : "page_default_wallpaper_icon_focus_bg_ef";
- target : "page_default_wallpaper_icon_focus_bg";
- target : "page_gallery_icon_focus_bg_ef";
- target : "page_gallery_icon_focus_bg";
- }
-
- /* preview */
- program {
- name : "show_preview";
- signal : "show_preview";
- source : "preview";
- action : STATE_SET "default" 0.0;
- target : "text_tap";
- }
- program {
- name : "hide_preview";
- signal : "hide_preview";
- source : "preview";
- action : STATE_SET "hidden" 0.0;
- target : "text_tap";
+ source: "click_event_area";
+ script {
+ emit("elm,action,title,clicked", "");
+ }
}
- }
-}
-
-
-group { name: "home_icon";
-
- images {
- image: "Wallpapers_home_ic.png" COMP;
- image: "Wallpapers_home_ef.png" COMP;
- }
-
- parts {
- part { name: "icon";
- type: IMAGE;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- image.normal: "Wallpapers_home_ic.png";
- min: 40 40;
- max: 40 40;
- fixed:1 1;
- color_class: "AO007";
+ program { name: "change_to_landscape";
+ script {
+ if (!get_int(landscape_mode)) {
+ set_int(landscape_mode, 1);
+ }
}
- /*description {state: "lockscreen" 0.0;
- inherit: "default" 0.0;
- color_class: "AO008";
- }*/
}
- part { name: "effect";
- type: IMAGE;
- mouse_events: 0;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- image.normal: "Wallpapers_home_ef.png";
- min: 40 40;
- max: 40 40;
- fixed:1 1;
+ program { name: "change_to_portrait";
+ script {
+ if (get_int(landscape_mode)) {
+ set_int(landscape_mode, 0);
+ }
}
}
- }
- programs{
- program { name: "lockscreen_page";
- signal: "lockscreen_page";
+ program { name: "landscape_mode";
source: "elm";
- action: STATE_SET "lockscreen" 0.0;
- target: "icon";
+ signal: "elm,state,orient,90";
+ after: "change_to_landscape";
}
- program { name: "home_page";
- signal: "home_page";
+ program { name: "landscape_mode2";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "icon";
- }
- program {
- name: "home_icon_clicked";
- signal: "mouse,clicked,1";
- source: "icon";
- action: SIGNAL_EMIT "home_icon_clicked" "edj";
+ signal: "elm,state,orient,270";
+ after: "change_to_landscape";
}
- }
-}
-
-group { name: "lockscreen_icon";
-
- images {
- image: "Wallpapers_lock_ic.png" COMP;
- image: "Wallpapers_lock_ef.png" COMP;
- }
-
- parts {
- part { name: "icon";
- type: IMAGE;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {state: "default" 0.0;
- image.normal: "Wallpapers_lock_ic.png";
- min: 40 40;
- max: 40 40;
- fixed:1 1;
- color_class: "AO007";
- }
- /*description {state: "home" 0.0;
- inherit: "default" 0.0;
- color_class: "AO008";
- }*/
- }
- part { name: "effect";
- type: IMAGE;
- mouse_events: 0;
- repeat_events: 0;
- scale: 1;
- description { state: "default" 0.0;
- image.normal: "Wallpapers_lock_ef.png";
- min: 40 40;
- max: 40 40;
- fixed:1 1;
- }
- }
- }
- programs{
- program { name: "home_page";
- signal: "home_page";
+ program { name: "portrait_mode";
source: "elm";
- action: STATE_SET "home" 0.0;
- target: "icon";
+ signal: "elm,state,orient,0";
+ after: "change_to_portrait";
}
- program { name: "lockscreen_page";
- signal: "lockscreen_page";
+ program { name: "portrait_mode2";
source: "elm";
- action: STATE_SET "default" 0.0;
- target: "icon";
- }
- program {
- name: "lock_icon_clicked";
- signal: "mouse,clicked,1";
- source: "icon";
- action: SIGNAL_EMIT "lock_icon_clicked" "edj";
+ signal: "elm,state,orient,180";
+ after: "change_to_portrait";
}
}
}
-group { name: "default_and_gallery_icon";
- images {
- image: "Wallpapers_bg.#.png" COMP;
- }
-
- parts {
- part {
- name : "bg";
- type : IMAGE;
- scale : 1;
- mouse_events : 1;
- repeat_events : 0;
- description {
- state : "default" 0.0;
- image.normal : "Wallpapers_bg.#.png";
- }
- }
- part {
- name : "cliper";
- type : RECT;
- scale : 1;
- mouse_events : 0;
- repeat_events : 1;
- description {state: "default" 0.0;
- min : 137 137;
- max : 137 137;
- fixed : 1 1;
- rel1 { relative: 0.5 0.5; to: "bg";}
- rel2 { relative: 0.5 0.5; to: "bg";}
- }
- }
- part {
- name : "default_bg";
- type : SWALLOW;
- scale : 1;
- mouse_events : 0;
- repeat_events : 1;
- clip_to: "cliper";
- description {
- state : "default" 0.0;
- }
- }
- part {
- name : "cover_bg";
- type : RECT;
- scale : 1;
- mouse_events : 0;
- repeat_events : 1;
- clip_to: "cliper";
- description {
- color_class : "AO009";
- }
- }
- part {
- name: "image";
- type: SWALLOW;
- scale: 1;
- mouse_events : 0;
- repeat_events : 1;
- clip_to: "cliper";
- description {
- state: "default" 0.0;
- }
- }
- part {
- name: "effect";
- type: SWALLOW;
- scale: 1;
- mouse_events : 0;
- repeat_events : 1;
- description {
- state: "default" 0.0;
- }
- }
- part { name: "text";
- type: TEXTBLOCK;
- effect : "TIZEN_SHADOW";
- mouse_events : 0;
- repeat_events : 1;
- scale: 1;
- description {state: "default" 0.0;
- color : LOCK_TEXT_COLOR;
- color2 : LOCK_TEXT_COLOR2;
- color3 : LOCK_TEXT_COLOR3;
- fixed:1 1;
- visible: 1;
- align : 0.5 1.0;
- rel1 { relative: 5/137 130/137; to: "image";}
- rel2 { relative: 132/137 130/137; to: "image";}
- text {
- style: style_default_and_gallery;
- min : 0 1;
- align : 0.5 1.0;
- }
- }
- }
- part { name: "press_effect";
- type: RECT;
- scale: 1;
- mouse_events : 0;
- repeat_events : 1;
- clip_to: "cliper";
- description { state: "default" 0.0;
- color : 0 0 0 0;
- }
- description {state: "pressed" 0.0;
- color_class: "AO011";
- }
- }
- }
- programs{
- program { name: "pressed";
- signal: "mouse,down,1";
- source: "bg";
- action: STATE_SET "pressed" 0.0;
- target: "press_effect";
- }
- program { name: "unpressed";
- signal: "mouse,up,1";
- source: "bg";
- action: STATE_SET "default" 0.0;
- target: "press_effect";
- }
- program {
- name : "clicked";
- signal : "mouse,clicked,1";
- source : "bg";
- action : SIGNAL_EMIT "default_and_gallery_icon" "clicked";
- }
- }
-}
-
-
diff --git a/res/resources/edje/popup-wallpaper.edc b/res/resources/edje/popup-wallpaper.edc
index b07859a..5b99a65 100644..100755
--- a/res/resources/edje/popup-wallpaper.edc
+++ b/res/resources/edje/popup-wallpaper.edc
@@ -1,9 +1,5 @@
/*
- * popup-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 20014-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.
@@ -20,12 +16,11 @@
*/
collections {
- base_scale: 1.8;
+ base_scale: 2.4;
+ #include "color_classes.edc"
#include "popup-wallpaper-macro.edc"
#include "popup-wallpaper-main-view.edc"
- #include "popup-color-theme-main-view.edc"
#include "mutiple-wallpaper.edc"
#include "gengrid_customized_theme.edc"
- #include "cp-wallpaper-main-view.edc"
}
diff --git a/res/resources/icons/core_icon_back.png b/res/resources/icons/core_icon_back.png
new file mode 100755
index 0000000..baf1df0
--- /dev/null
+++ b/res/resources/icons/core_icon_back.png
Binary files differ
diff --git a/res/resources/icons/home_wallpapaer_title_bg.#.png b/res/resources/icons/home_wallpapaer_title_bg.#.png
new file mode 100755
index 0000000..12a637c
--- /dev/null
+++ b/res/resources/icons/home_wallpapaer_title_bg.#.png
Binary files differ
diff --git a/src/cp-wallpaper-main.c b/src/cp-wallpaper-main.c
deleted file mode 100755
index e5ce007..0000000
--- a/src/cp-wallpaper-main.c
+++ /dev/null
@@ -1,2276 +0,0 @@
-/*
- * starter
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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 <vconf.h>
-#include <vconf-keys.h>
-#include <ui-gadget.h>
-#include <ui-gadget-module.h>
-#include <wallpaper_service.h>
-#include <efl_assist.h>
-#include <feedback.h>
-#include <system_settings.h>
-
-#include "cp-wallpaper-main.h"
-#include "wallpaper-ui-service.h"
-#include "wallpaper-ui-service-main.h"
-
-static Elm_Gen_Item_Class itc_cp_menu_1text1icon;
-static Elm_Gen_Item_Class itc_cp_title_2text_expandable;
-static Elm_Gen_Item_Class itc_cp_menu_1icon_no_line;
-static Elm_Gen_Item_Class itc_cp_help_1text;
-static Elm_Gen_Item_Class itc_cp_menu_1text;
-
-
-static Elm_Gen_Item_Class cp_itc_separator;
-static Elm_Gen_Item_Class cp_itc_separator2;
-
-//static Elm_Object_Item *genlist_selected_item = NULL;
-static Evas_Object *cp_g_genlist = NULL;
-static Evas_Object *interval_popup;
-
-
-
-extern Eina_List *cp_wallpaper_list;
-
-static Ecore_Timer *timer = NULL;
-int cp_list_cnt = 0;
-
-
-static cp_wallpaper_ug_data *ug_data = NULL;
-static Evas_Object *cp_gengrid = NULL;
-static Elm_Gengrid_Item_Class *cp_gic = NULL;
-static unsigned int cp_checked_num = 0;
-static Elm_Object_Item *cp_navi_item = NULL;
-static char navi_title[256] = {0};
-static Evas_Object *done_btn = NULL;
-
-Evas_Object *main_layout = NULL;
-Evas_Object *cp_item_radio = NULL;
-static Evas_Object *cp_radio_group = NULL;
-
-static Elm_Object_Item *item_interval = NULL ;
-static Elm_Object_Item *item_wifi = NULL ;
-static Elm_Object_Item *item_enhanced = NULL ;
-static Elm_Object_Item *item_gengrid = NULL ;
-
-static Elm_Object_Item *cp_item_radio1h = NULL;
-static Elm_Object_Item *cp_item_radio3h = NULL;
-static Elm_Object_Item *cp_item_radio6h = NULL;
-static Elm_Object_Item *cp_item_radio12h = NULL;
-
-static int backup_check[100] = {0,};
-
-enum {
- IDS_COM_SK_OK = 0,
- IDS_COM_SK_CANCEL,
- IDS_CPWALLPAPER_SYSTEM_STRING_MAX,
-};
-
-enum {
- IDS_CPWALLPAPER_INTERVAL_60min = IDS_CPWALLPAPER_SYSTEM_STRING_MAX,
- IDS_CPWALLPAPER_INTERVAL_180min,
- IDS_CPWALLPAPER_INTERVAL_360min,
- IDS_CPWALLPAPER_INTERVAL_720min,
- IDS_CPWALLPAPER_INTERVAL_1440min,
- IDS_CPWALLPAPER_APP_STRING_MAX, /* 3 */
-};
-
-extern char lock_path[6][MAX_LENGTH_LINE];
-
-extern Eina_Bool flag_lock_changed;
-
-extern Eina_Bool flag_lock_from_default;
-extern Eina_Bool flag_lock_from_gallery;
-extern Eina_Bool flag_lock_from_cp;
-
-extern Evas_Object *bg_lock_icon;
-
-extern Evas_Object *display_popup = NULL;
-
-#define POPUP_CREATE_FUNC_HANDLE "__POPUP_CREATE_FUNC_HANDLE__"
-
-static void _del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("%p %p", display_popup, obj);
-
- if(display_popup == obj) {
- display_popup = NULL;
- } else {
- evas_object_del(display_popup);
- display_popup = NULL;
- }
-}
-
-static void cp_item_check_changed_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_grid_item_s *s_item = (cp_grid_item_s *)data;
- if(!s_item)
- return;
-
- Eina_Bool check_state = elm_check_state_get(obj);
- if(check_state == EINA_TRUE) {
- cp_checked_num++;
- WALLPAPERUI_DBG("checked_num=%d", cp_checked_num);
- } else {
- cp_checked_num--;
- WALLPAPERUI_DBG("checked_num=%d", cp_checked_num);
- }
-
- if(cp_checked_num == 0) {
- elm_object_disabled_set(done_btn, EINA_TRUE);
- } else {
- elm_object_disabled_set(done_btn, EINA_FALSE);
- }
-
- snprintf(navi_title, sizeof(navi_title), APP_STRING("IDS_ST_HEADER_PD_SELECTED_ABB"), cp_checked_num);
- elm_object_item_part_text_set(cp_navi_item, "default", navi_title);
-
- s_item->check_state = check_state;
-}
-
-static Evas_Object *cp_grid_content_get(void *data, Evas_Object *obj, const char *part)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_grid_item_s *s_item = (cp_grid_item_s *)data;
- if(!s_item) {
- return NULL;
- }
-
- if(part != NULL && !strcmp(part, "elm.swallow.icon"))
- {
- Evas_Object *layout = elm_layout_add(obj);
- if(s_item->index == 1)
- {
- if(elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "gengrid.item.check") == EINA_FALSE)
- {
- WALLPAPERUI_DBG("Cannot load gengrid item edj");
- return NULL;
- }
- s_item->content = layout;
-
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- evas_object_show(layout);
-
- Evas_Object *check = elm_check_add(layout);
- evas_object_propagate_events_set(check, EINA_FALSE);
-
- int status = -1;
- int error_code = wallpaper_service_get_category_on_status(s_item->code, &status);
- if(WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("check_status [%d] ", status);
- if(status == 1) {
- s_item->check_state = EINA_TRUE;
- cp_checked_num++;
- elm_check_state_set(check, EINA_TRUE);
- } else {
- s_item->check_state = EINA_FALSE;
- elm_check_state_set(check, EINA_FALSE);
- }
- }
-
- //elm_check_state_set(check, EINA_TRUE);
- evas_object_repeat_events_set(check, EINA_FALSE);
- elm_object_part_content_set(layout, "check", check);
- s_item->check = check;
- evas_object_smart_callback_add(check, "changed", cp_item_check_changed_cb, s_item);
-
-/* Evas_Object *image = elm_image_add(layout);
- elm_object_part_content_set(layout, "item", image);
- CP_WALLPAPER_DBG("path=%s", s_item->path);
- elm_image_file_set(image, s_item->path, NULL);
- elm_image_aspect_fixed_set(image, EINA_FALSE);
- elm_image_preload_disabled_set(image, EINA_FALSE);
- evas_object_show(image);*/
- Evas_Object *bg = elm_bg_add(layout);
- if(bg == NULL) {
- WALLPAPERUI_DBG("bg is NULL");
- return NULL;
- }
- elm_object_part_content_set(layout, "item", bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_bg_option_set(bg, ELM_BG_OPTION_SCALE);
- WALLPAPERUI_DBG("path = %s", s_item->path);
- elm_bg_file_set(bg, s_item->path, NULL);
- evas_object_show(bg);
-
- WALLPAPERUI_DBG("name = %s", s_item->name);
- elm_object_part_text_set(layout, "text", s_item->name);
- }
-
-
- return layout;
- }
-
- return NULL;
-}
-
-/*
-static void cp_grid_content_del(void *data, Evas_Object *obj, const char *part)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_grid_item_s *s_item = (cp_grid_item_s *)data;
- if(!s_item) {
- return;
- }
-
- if(s_item->path) {
- free(s_item->path);
- }
- free(s_item);
-}
-*/
-
-static void cp_item_selected(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
- cp_grid_item_s *s_item = (cp_grid_item_s *)data;
- if(!s_item)
- return;
-
- elm_gengrid_item_selected_set(s_item->item, EINA_FALSE);
- s_item->check_state= !(elm_check_state_get(s_item->check));
- elm_check_state_set(s_item->check, s_item->check_state);
-
- cp_item_check_changed_cb((void *)s_item, s_item->check, NULL);
-}
-
-static char *grid_text_get(void *data, Evas_Object *obj, const char *part)
-{
- cp_grid_item_s *s_item = (cp_grid_item_s *)data;
- if(!s_item)
- return NULL;
-
- if (!strcmp(part, "elm.text"))
- {
- WALLPAPERUI_DBG("%s",s_item->name);
- return strdup(s_item->name);
- }
-
- return NULL;
-}
-
-static void _realized_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- snprintf(navi_title, sizeof(navi_title), APP_STRING("IDS_ST_HEADER_PD_SELECTED_ABB"), cp_checked_num);
- elm_object_item_part_text_set(cp_navi_item, "default", navi_title);
-}
-
-static Evas_Object *cp_gengrid_add(Evas_Object *parent)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_checked_num = 0;
-
- Evas_Object *gengrid = elm_gengrid_add(parent);
-
- Elm_Theme *th = elm_theme_new();
- elm_theme_ref_set(th, NULL);
- elm_theme_extension_add(th, EDJDIR"/popup-wallpaper.edj");
- elm_object_theme_set(gengrid, th);
-
- elm_scroller_policy_set(gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- //double scale = elm_config_scale_get();
- //WALLPAPERUI_DBG("scale %f",scale);
- elm_gengrid_item_size_set(gengrid, 160, 160);
-
- elm_gengrid_align_set(gengrid, 0.0, 0.0);
- elm_gengrid_horizontal_set(gengrid, EINA_FALSE);
- elm_scroller_bounce_set(gengrid, EINA_FALSE, EINA_FALSE);
- //elm_gengrid_cache_mode_set(gengrid, EINA_TRUE);
- elm_gengrid_multi_select_set(gengrid, EINA_FALSE);
-
- evas_object_smart_callback_add(gengrid, "realized", _realized_cb, NULL);
-
- //elm_gengrid_select_mode_set(gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
-
- if(cp_gic != NULL)
- {
- elm_gengrid_item_class_free(cp_gic);
- cp_gic = NULL;
- }
-
- cp_gic = elm_gengrid_item_class_new();
- //cp_gic->item_style = "customized_default_style";
- cp_gic->item_style = "default";
- cp_gic->func.text_get = grid_text_get;
- cp_gic->func.content_get = cp_grid_content_get;
- cp_gic->func.state_get = NULL;
- cp_gic->func.del = NULL; //cp_grid_content_del;
-
- Eina_List *l = NULL;
- cp_grid_item_s *data = NULL;
- EINA_LIST_REVERSE_FOREACH(cp_wallpaper_list, l, data) {
- if(data != NULL) {
- data->index = 1;
- data->check_state = EINA_TRUE;
- WALLPAPERUI_DBG("path = %s", data->path);
- data->item = elm_gengrid_item_append(gengrid, cp_gic, data, cp_item_selected, data);
- }
- }
-
- return gengrid;
-}
-
-static void _change_category_cancel_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = (Evas_Object *)data;
- if(!popup) {
- return;
- }
- #if 0
- Evas_Object *check = NULL;
- check = (Evas_Object*)evas_object_data_get(popup, "check");
- Eina_Bool check_state = elm_check_state_get(check);
- WALLPAPERUI_DBG("_change_category_cancel_response_cb. %d",check_state);
- if(check_state == EINA_TRUE)
- {
- vconf_set_bool(VCONFKEY_LOCKSCREEN_CP_CHANGE_CATEGORY_DONOTSHOWAGAIN, 1);
- }
- #endif
-
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void _change_category_download_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = (Evas_Object *)data;
- if(!popup) {
- return;
- }
-
- Evas_Object *check = NULL;
- check = (Evas_Object*)evas_object_data_get(popup, "check");
- Eina_Bool check_state = elm_check_state_get(check);
- WALLPAPERUI_DBG("_change_category_cancel_response_cb. %d", check_state);
- if(check_state == EINA_TRUE)
- {
- vconf_set_bool(VCONFKEY_LOCKSCREEN_CP_CHANGE_CATEGORY_DONOTSHOWAGAIN, 1);
- }
-
- evas_object_del(popup);
- popup = NULL;
-
- done_button_cb();
- elm_naviframe_item_pop(ug_data->navi_bar);
-
- WALLPAPERUI_TRACE_END;
-}
-
-
-static void _popup_interest_change()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup;
- Evas_Object *layout;
- Evas_Object *btn;
- Evas_Object *label;
- Evas_Object *check;
-
- popup = elm_popup_add(ug_data->navi_bar);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- elm_object_part_text_set(popup, "title,text",APP_STRING("IDS_LCKSCN_HEADER_CHANGE_CATEGORY_SELECTION_ABB"));
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- /* layout */
- layout = elm_layout_add(popup);
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_checkview_layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_text_set(layout, "elm.text", APP_STRING("IDS_ST_BODY_DO_NOT_SHOW_AGAIN"));
-
- /* disable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_CANCEL"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", _change_category_cancel_response_cb, popup);
-
- /* enable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_DOWNLOAD_ABB3"));
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", _change_category_download_response_cb, popup);
- evas_object_show(popup);
-
-
- /* check */
- check = elm_check_add(popup);
- elm_object_style_set(check, "popup");
- elm_object_text_set(check, APP_STRING("IDS_ST_BODY_DO_NOT_SHOW_AGAIN"));
- evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_content_set(layout, "elm.swallow.end", check);
- evas_object_data_set(popup, "check", check);
-
- /* label */
- label = elm_label_add(layout);
- elm_object_style_set(label, "popup/default");
- elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- elm_object_text_set(label, APP_STRING("IDS_LCKSCN_POP_NEW_WALLPAPER_IMAGES_WILL_BE_DOWNLOADED_FOR_THE_CATEGORY_YOU_JUST_SELECTED_THIS_MAY_RESULT_IN_ADDITIONAL_CHARGES"));
- evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(label);
- elm_object_part_content_set(layout, "elm.swallow.content", label);
-
- elm_object_content_set(popup, layout);
-
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
-// evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _popup_center_check_cb);
-}
-
-static void display_toast_popup(void)
-{
- char* toast[512] = {0,};
- int wifi_only = 0;
- wallpaper_service_get_wifi_only_setting(&wifi_only);
- int interval = 0;
- wallpaper_service_get_interval(&interval);
- if(wifi_only)
- {
- if(interval==1)
- {
- strncpy(toast,APP_STRING("IDS_LCKSCN_TPOP_WALLPAPER_WILL_CHANGE_EVERY_HOUR_WHILE_CONNECTED_VIA_WI_FI_ONLY"),512-1);
- }
- else
- {
- snprintf(toast,sizeof(toast),APP_STRING("IDS_LCKSCN_TPOP_WALLPAPER_WILL_CHANGE_EVERY_PD_HOURS_WHILE_CONNECTED_VIA_WI_FI_ONLY"),interval );
- }
- }
- else
- {
- if(interval==1)
- {
- strncpy(toast,APP_STRING("IDS_LCKSCN_TPOP_WALLPAPER_WILL_CHANGE_EVERY_HOUR_WHILE_CONNECTED_VIA_WI_FI_OR_MOBILE_NETWORK"),512-1);
- }
- else
- {
- snprintf(toast,sizeof(toast),APP_STRING("IDS_LCKSCN_TPOP_WALLPAPER_WILL_CHANGE_EVERY_PD_HOURS_WHILE_CONNECTED_VIA_WI_FI_OR_MOBILE_NETWORK"),interval );
- }
- }
-
- notification_status_message_post(toast);
-
-}
-
-void cpwallpaper_changing_TA_launch_request()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- wallpaper_service_category_code_h handle = NULL;
-
- Eina_List *l = NULL;
- cp_grid_item_s *item = NULL;
- int index = 0;
- EINA_LIST_REVERSE_FOREACH(cp_wallpaper_list, l, item) {
- if(item!=NULL)
- {
- if(item->check_state==EINA_TRUE)
- {
- WALLPAPERUI_DBG("CODE ADD %s",item->name);
- wallpaper_service_add_category_code(item->code, &handle);
- index++;
- }
- }
- }
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT, index);
- /* Set Category On*/
- wallpaper_service_set_category_on(handle);
- wallpaper_service_free_category_code_handle(handle);
- display_toast_popup();
-
- if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }
-}
-
-static void popup_ok_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("popup_disable_btn_clicked_cb");
-
- Evas_Object *popup = data;
- evas_object_del(popup);
-
- wallpaper_service_set_verfication(1);
- done_button_cb();
- elm_naviframe_item_pop(ug_data->navi_bar);
-}
-
-static void popup_disable_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Evas_Object *popup = data;
- evas_object_del(popup);
-
- wallpaper_service_set_verfication(0);
- done_button_cb();
- elm_naviframe_item_pop(ug_data->navi_bar);
-}
-
-
-static void _netword_warning_popup_create(void);
-
-
-
-static void popup_update_my_interest(void)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup_upsate;
- Evas_Object *btn;
-
- /* popup */
- popup_upsate = elm_popup_add(ug_data->navi_bar);
- ea_object_event_callback_add(popup_upsate, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_size_hint_weight_set(popup_upsate, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_text_set(popup_upsate, APP_STRING("IDS_LCKSCN_POP_RECEIVING_WALLPAPER_IMAGES_AND_ADDITIONAL_INFORMATION_VIA_MOBILE_NETWORKS_MAY_RESULT_IN_ADDITIONAL_CHARGES_MSG"));
- elm_object_part_text_set(popup_upsate, "title,text", APP_STRING("IDS_LCKSCN_HEADER_UPDATE_MY_INTERESTS_ABB"));
-
-
- /* OK button */
- btn = elm_button_add(popup_upsate);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_OK_ABB"));
- elm_object_part_content_set(popup_upsate, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_ok_btn_clicked_cb, popup_upsate);
- evas_object_show(popup_upsate);
-
-// display_popup = popup;
-// evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
-// evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _netword_warning_popup_create);
-}
-
-static void popup_update_my_interest_btn(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Evas_Object *popup = data;
- evas_object_del(popup);
-
- popup_update_my_interest();
-}
-
-static void popup_enable_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = data;
- if(popup) {
- evas_object_del(popup);
- }
-
- Evas_Object *btn;
-
- /* popup */
- popup = elm_popup_add(ug_data->navi_bar);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_text_set(popup, APP_STRING("MIDS_LSM_MSG_TO_PROVIDE_YOU_WITH_A_MORE_ENHANCED_EXPERIENCE_MSG"));
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_OPT_ENABLE_ENHANCED_SERVICE_ABB"));
-
-
- /* disable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_DO_NOT_ENABLE_ABB"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_disable_btn_clicked_cb, popup);
-
- /* enable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_ENABLE"));
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_update_my_interest_btn, popup);
- evas_object_show(popup);
-
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _netword_warning_popup_create);
-}
-
-static void _netword_warning_popup_create(void)
-{
- if(ug_data) {
- popup_enable_btn_clicked_cb(NULL, NULL, NULL);
- } else {
- WALLPAPERUI_ERR("ug_data is NULL");
- }
-}
-
-static void create_enable_popup()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup;
- Evas_Object *btn;
-
- /* popup */
- popup = elm_popup_add(ug_data->navi_bar);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_text_set(popup, APP_STRING("MIDS_LSM_MSG_TO_PROVIDE_YOU_WITH_A_MORE_ENHANCED_EXPERIENCE_MSG"));
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_HEADER_ENHANCED_SERVICE_ABB"));
-
- /* disable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_DO_NOT_ENABLE_ABB"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_disable_btn_clicked_cb, popup);
-
- /* enable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_ENABLE"));
- elm_object_part_content_set(popup, "button2", btn);
- //evas_object_smart_callback_add(btn, "clicked", popup_enable_btn_clicked_cb, popup);
- evas_object_smart_callback_add(btn, "clicked", popup_update_my_interest_btn, popup);
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, create_enable_popup);
-}
-
-static void cp_cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- /*if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }*/
-
-/* int error = wallpaper_service_deactivate();
- if(error != 0) {
- WALLPAPERUI_DBG("wallpaper_service_deactivate fail.");
- }*/
-
- elm_naviframe_item_pop(ug_data->navi_bar);
-}
-static int check_checkbox_changed(void)
-{
- Eina_List *l = NULL;
- cp_grid_item_s *item = NULL;
- int index = 0;
- int breturn = 1;
-
- EINA_LIST_REVERSE_FOREACH(cp_wallpaper_list, l, item) {
- if(item!=NULL)
- {
- if(item->check_index<100)
- {
- if(backup_check[item->check_index]==item->check_state)
- {
- breturn = 0;
- }
- else
- {
- breturn = 1;
- break;
- }
- }
- }
- }
- return breturn;
-}
-static void cp_done_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- if(obj) {
- elm_object_signal_emit(obj, "pressed", "elm");
- }
-
- flag_lock_changed = EINA_TRUE;
- flag_lock_from_cp = EINA_TRUE;
- flag_lock_from_default = EINA_FALSE;
- flag_lock_from_gallery = EINA_FALSE;
-
- int value1 = 0;
- int value2 = 0;
-
- vconf_get_bool(VCONFKEY_LOCKSCREEN_CP_FIRST_SET, &value1);
- wallpaper_service_get_verfication(&value2);
- WALLPAPERUI_DBG("set_as_wallpaper_pressed begin %d %d\n", value1, value2);
-
- vconf_set_bool(VCONFKEY_LOCKSCREEN_CP_FIRST_SET, 0);
-
- elm_image_file_set(bg_lock_icon, DEFAULT_INTEREST_PATH, NULL);
- evas_object_show(bg_lock_icon);
-
- memset(lock_path, 0, sizeof(lock_path));
- strcpy(lock_path[0], DEFAULT_INTEREST_PATH);
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_CP);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_CP");
-
- if(value1==1 && value2==0) {
- create_enable_popup();
- } else {
- int changed = 0;
- changed = check_checkbox_changed();
- WALLPAPERUI_DBG("changed = %d",changed);
- if (changed)
- {
- int value = 0;
- vconf_get_bool(VCONFKEY_LOCKSCREEN_CP_CHANGE_CATEGORY_DONOTSHOWAGAIN,&value);
- WALLPAPERUI_DBG("value = %d",value);
- if(value==0)
- {
- _popup_interest_change();
- }
- else
- {
- done_button_cb();
- elm_naviframe_item_pop(ug_data->navi_bar);
- }
- }
- else
- {
- done_button_cb();
- elm_naviframe_item_pop(ug_data->navi_bar);
- }
- }
-}
-
-static void _privacy_notice_popup_back_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- evas_object_del(ug_data->popup);
- ug_data->popup = NULL;
-}
-
-static void _check_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = (Evas_Object *)data;
-
- Evas_Object *check = NULL;
- check = (Evas_Object*)evas_object_data_get(popup, "check");
- Eina_Bool check_state = elm_check_state_get(check);
- WALLPAPERUI_DBG("_check_response_cb. %d",check_state);
- if(check_state == EINA_TRUE)
- {
- WALLPAPERUI_DBG("!!!");
- vconf_set_bool(VCONFKEY_LOCKSCREEN_CP_SETPOPUP_DONOTSHOWAGAIN, 1);
- }
-
- evas_object_del(popup);
- popup = NULL;
-
- cp_wallpaper_main_create_view();
-}
-
-static void _popup_center_check_cb()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup;
- Evas_Object *layout;
- Evas_Object *btn;
- Evas_Object *label;
- Evas_Object *check;
- //Evas_Object *win = data;
-
- popup = elm_popup_add(ug_data->navi_bar);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_BUTTON2_MY_INTERESTSM_PREFERRED_CATEGORIES_ABB"));
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- /* layout */
- layout = elm_layout_add(popup);
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_checkview_layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_text_set(layout, "elm.text", APP_STRING("IDS_ST_BODY_DO_NOT_SHOW_AGAIN"));
-
- /* ok button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_OK_ABB"));
- //ea_theme_object_color_replace(btn, "W011", "W0111");
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", _check_response_cb, popup);
-
- /* check */
- check = elm_check_add(popup);
- elm_object_style_set(check, "popup");
- elm_object_text_set(check, APP_STRING("IDS_ST_BODY_DO_NOT_SHOW_AGAIN"));
- evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_content_set(layout, "elm.swallow.end", check);
- evas_object_data_set(popup, "check", check);
-
- /* label */
- label = elm_label_add(layout);
- elm_object_style_set(label, "popup/default");
- elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- elm_object_text_set(label, APP_STRING("IDS_LCKSCN_POP_SET_YOUR_DEVICE_TO_SHOW_HIGH_QUALITY_IMAGES_BASED_ON_YOUR_INTERESTS_ON_THE_LOCK_SCREEN_SELECT_YOUR_PREFERRED_CATEGORIES"));
- evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(label);
- elm_object_part_content_set(layout, "elm.swallow.content", label);
-
- elm_object_content_set(popup, layout);
-
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _popup_center_check_cb);
-}
-
-void cp_wallpaper_main(wallpaper_ui_service_appdata *data)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(data == NULL) {
- return;
- }
-
- ug_data = (cp_wallpaper_ug_data *)calloc(1, sizeof(cp_wallpaper_ug_data));
- ug_data->navi_bar = data->navi_bar;
- ug_data->win_main = data->win;
-
- int value = 0;
- vconf_get_bool(VCONFKEY_LOCKSCREEN_CP_SETPOPUP_DONOTSHOWAGAIN, &value);
- WALLPAPERUI_DBG("value = %d", value);
- if(value == 0) {
- _popup_center_check_cb();
- } else {
- cp_wallpaper_main_create_view();
- }
-}
-
-int cp_info_list_insert(cp_grid_item_s *obj)
-{
- Eina_List *l = NULL;
- cp_grid_item_s *data = NULL;
-
- WALLPAPERUI_DBG("%s!",obj->name);
-
- /* check name */
- EINA_LIST_REVERSE_FOREACH(cp_wallpaper_list, l, data) {
- if(data->name == obj->name)
- {
- WALLPAPERUI_DBG("%s is already exist in the list!", obj->name);
- return 0;
- }
- }
- cp_wallpaper_list = eina_list_prepend(cp_wallpaper_list, obj);
-
- return 0;
-}
-
-int cp_info_list_free(Eina_List *list)
-{
- Eina_List *l = NULL;
- Eina_List *l_next = NULL;
- cp_grid_item_s *data = NULL;
-
- EINA_LIST_FOREACH_SAFE(list, l, l_next, data)
- {
- if(data!=NULL)
- {
- if(data->name!=NULL)
- free(data->name);
- if(data->path!=NULL)
- free(data->path);
- if(data->code!=NULL)
- free(data->code);
- if(data!=NULL)
- free(data);
- list = eina_list_remove_list(list, l);
- if (eina_error_get())
- return 0;
- }
- }
- eina_list_free(list);
- list = NULL;
- return eina_error_get();
-}
-
-static void _network_error_popup_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- if(ug_data->popup_progress != NULL )
- {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
-
- if(ug_data->popup) {
- evas_object_del(ug_data->popup);
- ug_data->popup = NULL;
- }
-
- if(ug_data->navi_bar){
- elm_naviframe_item_pop(ug_data->navi_bar);
- }
-}
-
-static void _create_network_error_popup(void)
-{
- Evas_Object *btn1;
- if(ug_data == NULL) {
- WALLPAPERUI_ERR("ug_data is NULL");
- return;
- }
-
- ug_data->popup = elm_popup_add(ug_data->navi_bar);
- elm_popup_align_set(ug_data->popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
-
- ea_object_event_callback_add(ug_data->popup, EA_CALLBACK_BACK,_network_error_popup_cb, ug_data);
-
- //elm_object_style_set(ug_data->popup, "no_effect");
-
- elm_object_part_text_set(ug_data->popup, "title,text", APP_STRING("IDS_LCKSCN_HEADER_UNABLE_TO_CONNECT_ABB"));
- elm_object_text_set(ug_data->popup, APP_STRING("IDS_CALL_BODY_NETWORK_ERROR_OCCURRED_TRY_LATER"));
- btn1 = elm_button_add(ug_data->popup);
- elm_object_style_set(btn1, "popup");
- elm_object_text_set(btn1, APP_STRING("IDS_ST_BUTTON_OK_ABB"));
- elm_object_part_content_set(ug_data->popup, "button1", btn1);
- evas_object_smart_callback_add(btn1, "clicked", _network_error_popup_cb, ug_data);
- evas_object_show(ug_data->popup);
-
- display_popup = ug_data->popup;
- evas_object_event_callback_add(ug_data->popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(ug_data->popup, POPUP_CREATE_FUNC_HANDLE, _create_network_error_popup);
-}
-
-static void _update_timer_cb(void *data)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- if(data == NULL)
- return;
-
- if(ug_data->popup_progress != NULL) {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
-
- if(cp_gengrid != NULL){
- WALLPAPERUI_DBG("cp_gengrid is not NULL");
- //elm_gengrid_clear(cp_gengrid);
- //cp_gengrid = NULL;
- //TODO
- //cp_wallpaper_setting_update_view(ug_data);
- }
-
- cp_gengrid = cp_gengrid_add(main_layout);
- elm_object_part_content_set(main_layout, "cp", cp_gengrid);
-
- if (timer != NULL) {
- ecore_timer_del(timer);
- timer = NULL;
- }
-}
-
-static void _destroy_timer_cb(void *data)
-{
- if(data==NULL)
- return;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- WALLPAPERUI_DBG("_destroy_timer_cb begin\n");
-
- if(ug_data->popup_progress != NULL) {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
-
- _create_network_error_popup();
-
- if (timer != NULL) {
- ecore_timer_del(timer);
- timer = NULL;
- }
-}
-
-static void __wallpaper_service_get_category_list_cb(int error_code, void *user_data, wallpaper_service_category_h handle)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }
-
- if(user_data==NULL)
- return;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)user_data;
-
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- unsigned int count = 0;
- char *tmp;
- unsigned int index = 0;
- wallpaper_service_get_category_list_count(handle, &count);
- cp_list_cnt = count;
- if(count>0)
- {
- for (index=0; index < count; index++)
- {
- cp_grid_item_s *s_item;
- s_item = (cp_grid_item_s *)calloc(1, sizeof(cp_grid_item_s));
- tmp = NULL;
- s_item->check_index = index;
- error_code = wallpaper_service_get_category_info_code(handle, index, &tmp);
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("code [%s] ",tmp);
- if(tmp) {
- s_item->code = strdup(tmp);
- }
- g_free(tmp);
- }
- error_code = wallpaper_service_get_category_info_name(handle, index, &tmp);
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("name [%s] ",tmp);
- if(tmp) {
- s_item->name = strdup(tmp);
- }
- g_free(tmp);
- }
- error_code = wallpaper_service_get_category_info_on_img_url(handle, index, &tmp);
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("on_img_url [%s] ",tmp);
- g_free(tmp);
- }
- error_code = wallpaper_service_get_category_info_off_img_url(handle, index, &tmp);
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("off_img_url [%s] ",tmp);
- g_free(tmp);
- }
- error_code = wallpaper_service_get_category_info_thumbnail_path(handle, index, &tmp);
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("thumbnail_path [%s] ",tmp);
- if(tmp) {
- s_item->path = strdup(tmp);
- }
- g_free(tmp);
- }
- int status = 0;
- error_code = wallpaper_service_get_category_on_status(s_item->code, &status);
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code) {
- WALLPAPERUI_DBG("check_status [%d] ",status);
- if(status ==1)
- {
- s_item->check_state = EINA_TRUE;
- }
- else
- {
- s_item->check_state = EINA_FALSE;
- }
- backup_check[index] = status;
- }
-
- WALLPAPERUI_DBG("\n\n");
- s_item->data = user_data;
- cp_info_list_insert(s_item);
- }
- }
- wallpaper_service_free_category_info(handle);
-
- ug_data->category_received = 1;
-
- timer = ecore_timer_add(0.001, (void *)_update_timer_cb,ug_data);
- }
- else// if(WALLPAPER_SERVICE_ERROR_TIMEOUT == error_code)
- {
- timer = ecore_timer_add(0.001, (void *)_destroy_timer_cb,ug_data);
- }
-/* else
- {
- CP_WALLPAPER_DBG("Error [%d]", error_code);
- }*/
-}
-
-void __wallpaper_service_activate_cb(int error_code, void *user_data)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)user_data;
- if(ug_data==NULL)
- {
- WALLPAPERUI_ERR("ug_data NULL");
- }
-
- WALLPAPERUI_DBG("__wallpaper_service_activate_cb %d\n", error_code);
-
- if (WALLPAPER_SERVICE_ERROR_NONE == error_code)
- {
- wallpaper_service_get_category_list(__wallpaper_service_get_category_list_cb,ug_data);
- } else {
- if (timer != NULL) {
- ecore_timer_del(timer);
- timer = NULL;
- }
-
- timer = ecore_timer_add(0.001, (void *)_destroy_timer_cb,ug_data);
- }
-
- WALLPAPERUI_TRACE_END;
-}
-
-static void _no_network_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = (Evas_Object *)data;
- evas_object_del(popup);
- popup = NULL;
-
- //elm_naviframe_item_pop(ug_data->navi_bar);
-}
-
-static void _create_no_network_popup(void)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *btn1;
- if(ug_data == NULL) {
- WALLPAPERUI_ERR("ug_data is NULL");
- return;
- }
-
- Evas_Object *popup = elm_popup_add(ug_data->navi_bar);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
-
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_HEADER_UNABLE_TO_CONNECT_ABB"));
- elm_object_text_set(popup, APP_STRING("IDS_LCKSCN_POP_THERE_IS_NO_NETWORK_CONNECTION_CONNECT_TO_A_WI_FI_NETWORK_OR_TURN_ON_MOBILE_DATA_AND_TRY_AGAIN"));
- btn1 = elm_button_add(popup);
- elm_object_style_set(btn1, "popup");
- elm_object_text_set(btn1, APP_STRING("IDS_ST_BUTTON_OK_ABB"));
- elm_object_part_content_set(popup, "button1", btn1);
- evas_object_smart_callback_add(btn1, "clicked", _no_network_response_cb, popup);
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _create_no_network_popup);
-}
-
-static void _wallpaper_move_ctxpopup(Evas_Object *ctxpopup)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Evas_Object *win;
- Evas_Coord w, h;
-
- int pos = -1;
-
- /* We convince the top widget is a window */
- win = elm_object_top_widget_get(ctxpopup);
- elm_win_screen_size_get(win, NULL, NULL, &w, &h);
- pos = elm_win_rotation_get(win);
-
- switch (pos) {
- case 0:
- case 180:
- evas_object_move(ctxpopup, (w / 2), h);
- break;
- case 90:
- evas_object_move(ctxpopup, (h / 2), w);
- break;
- case 270:
- evas_object_move(ctxpopup, (h / 2), w);
- break;
- }
-}
-
-static void _lockscreen_more_popup_del_cb(void *data)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_wallpaper_ug_data *ugd = NULL;
-
- ret_if(data == NULL);
-
- ugd = (cp_wallpaper_ug_data *)data;
-
- if (ugd->more_popup != NULL) {
- evas_object_del(ugd->more_popup);
- ugd->more_popup = NULL;
- }
-}
-
-static void _lockscreen_more_popup_more_cb(void *data,
- Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- _lockscreen_more_popup_del_cb((cp_wallpaper_ug_data *)data);
-}
-
-static void _lockscreen_more_popup_back_cb(void *data,
- Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- _lockscreen_more_popup_del_cb((cp_wallpaper_ug_data *)data);
-}
-
-static void _lockscreen_more_popup_rotate_cb(void *data, Evas_Object *obj,
- void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_wallpaper_ug_data *ugd;
- Evas_Object * ctx;
-
- ugd = (cp_wallpaper_ug_data *)data;
- ret_if(ugd == NULL);
-
- ctx = ugd->more_popup;
- ret_if(ctx == NULL);
-
- _wallpaper_move_ctxpopup(ctx);
- evas_object_show(ctx);
-}
-
-static void _lockscreen_more_popup_dismiss_cb(void *data, Evas_Object *obj,
- void *event)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_wallpaper_ug_data *ugd;
-
- ugd = (cp_wallpaper_ug_data *)data;
- ret_if(ugd == NULL);
- ret_if(ugd->more_popup == NULL);
-
- evas_object_del(ugd->more_popup);
- ugd->more_popup = NULL;
-}
-
-static void _lockscreen_more_popup_delete_cb(void *data, Evas *e,
- Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Evas_Object *navi = (Evas_Object *)data;
- Evas_Object *ctx = obj;
-
- ret_if(navi == NULL);
-
- evas_object_smart_callback_del(ctx, "dismissed",
- _lockscreen_more_popup_dismiss_cb);
- evas_object_smart_callback_del(elm_object_top_widget_get(ctx),
- "rotation,changed", _lockscreen_more_popup_rotate_cb);
- evas_object_event_callback_del_full(ctx, EVAS_CALLBACK_DEL,
- _lockscreen_more_popup_delete_cb, navi);
-}
-static void cp_radio_change(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- int index = (int )data;
- WALLPAPERUI_DBG("index=%d", index);
- if(cp_item_radio) {
- elm_radio_value_set(cp_item_radio, index);
- }
-
- wallpaper_service_set_interval(index);
-
-/* int ret = -1;
- ret = vconf_set_int("db/wallpaper-service/interval", index);
- if (ret != 0) {
- CP_WALLPAPER_DBG("!!!!!!!!!!fails");
- }
- vconf_get_int("db/wallpaper-service/interval", &index);*/
- wallpaper_service_get_interval(&index);
- WALLPAPERUI_DBG("wallpaper_service_get_interval index=%d", index);
-
- //delete genlist
- elm_genlist_clear(cp_g_genlist);
- cp_g_genlist = NULL;
- //delete popup
- evas_object_del(interval_popup);
- interval_popup = NULL;
-
- //elm_genlist_item_update(item_interval);
- //elm_genlist_item_expanded_set(item_interval, EINA_FALSE);
-}
-
-static void
-gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Elm_Object_Item *it = (Elm_Object_Item*)event_info;
- elm_genlist_item_selected_set(it, EINA_FALSE);
- cp_radio_change(data, obj, event_info);
-}
-
-static Evas_Object*
-gl_radio_content_get_cb(void *data, Evas_Object *obj, const char *part)
-{
- int index = (int) data;
- //WALLPAPERUI_DBG("000 000 index = %d",index);
-
- int interval = 0;
-// vconf_get_int("db/wallpaper-service/interval", &interval);
- wallpaper_service_get_interval(&interval);
-
- if (!strcmp(part, "elm.icon.2")) {
- Evas_Object *content = elm_layout_add(obj);
- Evas_Object *radio;
- Evas_Object *radio_main = evas_object_data_get(obj, "radio");
- elm_layout_theme_set(content, "layout", "list/C/type.2", "default");
- radio = elm_radio_add(content);
- //elm_radio_group_add(radio, radio_main);
- //radio = elm_radio_add(obj);
- elm_radio_group_add(radio, radio_main);
- WALLPAPERUI_DBG("!!!!!!!!!!!!!radio = %p", radio);
- if(0 == index)
- {
- elm_radio_state_value_set(radio, 1);
- evas_object_smart_callback_add(radio, "changed", cp_radio_change, (void *)1);
- //elm_radio_group_add(radio, radio_group);
- elm_radio_value_set(radio, interval);
- cp_item_radio = radio;
- }
- else if (index == 1)
- {
- elm_radio_state_value_set(radio, 3);
- evas_object_smart_callback_add(radio, "changed", cp_radio_change, (void *)3);
- elm_radio_value_set(radio, interval);
- cp_item_radio = radio;
- }
- else if (index == 2)
- {
- elm_radio_state_value_set(radio, 6);
- evas_object_smart_callback_add(radio, "changed", cp_radio_change, (void *)6);
- elm_radio_value_set(radio, interval);
- cp_item_radio = radio;
- }
- else
- {
- elm_radio_state_value_set(radio, 12);
- evas_object_smart_callback_add(radio, "changed", cp_radio_change, (void *)12);
- elm_radio_value_set(radio, interval);
- cp_item_radio = radio;
- }
-
- //elm_radio_value_set(item, interval);
- evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_propagate_events_set(radio, EINA_TRUE);
- elm_layout_content_set(content, "elm.swallow.content", radio);
- return content;
- //return radio;
- }
- return NULL;
-}
-
-static char*
-gl_radio_text_get_cb(void *data, Evas_Object *obj, const char *part)
-{
- if(!strcmp(part, "elm.text.main.left"))
- {
- int index = (int) data;
-
- if(index == 0) {
- return strdup(APP_STRING("IDS_ST_OPT_EVERY_1_HOUR"));
- } else {
- char temp_str[128] = {0,};
- switch(index) {
- case 1 :
- snprintf(temp_str, sizeof(temp_str)-1, APP_STRING("IDS_ST_OPT_EVERY_PD_HOURS_ABB2"), 3);
- break;
- case 2 :
- snprintf(temp_str, sizeof(temp_str)-1, APP_STRING("IDS_ST_OPT_EVERY_PD_HOURS_ABB2"), 6);
- break;
- case 3 :
- default :
- snprintf(temp_str, sizeof(temp_str)-1, APP_STRING("IDS_ST_OPT_EVERY_PD_HOURS_ABB2"), 12);
- break;
- }
- return strdup(temp_str);
- }
- }
- else return NULL;
-}
-
-static void _create_interval_popup(void *data)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(ug_data == NULL) {
- WALLPAPERUI_ERR("ug_data is NULL");
- return;
- }
-
- static Elm_Genlist_Item_Class *cp_itcRadio = NULL;
-
- static Elm_Genlist_Item_Class itc;
- Evas_Object *popup;
- Evas_Object *genlist;
- Evas_Object *radio;
- Elm_Object_Item *item = NULL;
-
- /* popup */
- popup = elm_popup_add(ug_data->navi_bar);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_OPT_TRANSITION_INTERVAL_ABB"));
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _create_interval_popup);
-
- interval_popup = popup;
-
- //Evas_Object *layout = elm_layout_add(popup);
- //elm_layout_file_set(layout, SETTING_EDJ_PATH"/setting-custompopup.edj", "list_popup");
- //evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- //elm_object_content_set(popup, layout);
-
- /* genlist */
- genlist = elm_genlist_add(popup);
- evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
- cp_g_genlist = genlist;
-
- /* radio */
- radio = elm_radio_add(genlist);
- evas_object_propagate_events_set(radio, EINA_TRUE);
- elm_object_style_set(radio, "list");
- evas_object_data_set(genlist, "radio", radio);
-
- int interval = 0;
- wallpaper_service_get_interval(&interval);
- elm_radio_state_value_set(radio, interval);
- elm_radio_value_set(radio, interval);
- WALLPAPERUI_DBG("interval = %d",interval);
-
-
- itc.item_style = "1line";
- itc.func.text_get = gl_radio_text_get_cb;
- itc.func.content_get = gl_radio_content_get_cb;
- itc.func.state_get = NULL;
- itc.func.del = NULL;
- int i = 0;
-
- for (i = 0; i < 4; i++) {
- if(0 == i)
- {
- item = elm_genlist_item_append(genlist, &itc, (void *) i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, (void *) 1);
- }
- else if(1 == i)
- {
- item = elm_genlist_item_append(genlist, &itc, (void *) i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, (void *) 3);
- }
- else if(2 == i)
- {
- item = elm_genlist_item_append(genlist, &itc, (void *) i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, (void *) 6);
- }
- else
- {
- item = elm_genlist_item_append(genlist, &itc, (void *) i, NULL, ELM_GENLIST_ITEM_NONE, gl_radio_sel_cb, (void *) 12);
- }
- if(item == NULL)
- {
- WALLPAPERUI_ERR("elm_genlist_item_append failed(%d)", i);
- }
- }
- evas_object_show(genlist);
-
- elm_object_content_set(popup, genlist);
- evas_object_show(popup);
- #if 0
- Evas_Object *menu_glist = elm_genlist_add(layout);
- evas_object_show(menu_glist);
- elm_object_part_content_set(layout, "elm.swallow.content", menu_glist);
-
- cp_itcRadio = elm_genlist_item_class_new();
- if(cp_itcRadio) {
- cp_itcRadio->item_style = CPWALLPAPER_GENLIST_STYLE_RADIO;
- cp_itcRadio->func.text_get = _cp_gl_text_get;
- cp_itcRadio->func.content_get = _cp_gl_content_get;
- cp_itcRadio->func.state_get = _cp_gl_state_get;
- cp_itcRadio->func.del = NULL;
- }
- //evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb, NULL);
-
- cp_radio_group = elm_radio_add(menu_glist);
- elm_radio_state_value_set(cp_radio_group, 720);
- elm_radio_value_set(cp_radio_group, 720);
-
- cp_item_radio1h = elm_genlist_item_append(menu_glist,
- cp_itcRadio,
- (const void *)IDS_CPWALLPAPER_INTERVAL_60min,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- _cp_gl_sel,
- (const void *)1);
- cp_item_radio3h = elm_genlist_item_append(menu_glist,
- cp_itcRadio,
- (const void *)IDS_CPWALLPAPER_INTERVAL_180min,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- _cp_gl_sel,
- (const void *)3);
- cp_item_radio6h = elm_genlist_item_append(menu_glist,
- cp_itcRadio,
- (const void *)IDS_CPWALLPAPER_INTERVAL_360min,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- _cp_gl_sel,
- (const void *)6);
- cp_item_radio12h = elm_genlist_item_append(menu_glist,
- cp_itcRadio,
- (const void *)IDS_CPWALLPAPER_INTERVAL_720min,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- _cp_gl_sel,
- (const void *)12);
-
- evas_object_show(popup);
- #endif
- WALLPAPERUI_TRACE_END;
-}
-
-static void _interval_click_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_wallpaper_ug_data *ugd;
- ugd = (cp_wallpaper_ug_data *)data;
-
- //delete more_popup
- if(ugd->more_popup) {
- evas_object_del(ugd->more_popup);
- ugd->more_popup = NULL;
- }
-
- //popup
- _create_interval_popup(data);
-
- WALLPAPERUI_TRACE_END;
-}
-
-static void _wifi_cancel_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = (Evas_Object *)data;
- if(!popup) {
- return;
- }
-
- Evas_Object *check = NULL;
- check = (Evas_Object*)evas_object_data_get(popup, "check");
- Eina_Bool check_state = elm_check_state_get(check);
- WALLPAPERUI_DBG("_wifi_check_response_cb. %d",check_state);
- if(check_state == EINA_TRUE)
- {
- vconf_set_bool(VCONFKEY_LOCKSCREEN_CP_WIFIPOPUP_DONOTSHOWAGAIN, 1);
- }
-
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void _wifi_disable_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = (Evas_Object *)data;
- if(!popup) {
- return;
- }
-
- Evas_Object *check = NULL;
- check = (Evas_Object*)evas_object_data_get(popup, "check");
- Eina_Bool check_state = elm_check_state_get(check);
- WALLPAPERUI_DBG("_wifi_check_response_cb. %d", check_state);
- if(check_state == EINA_TRUE)
- {
- vconf_set_bool(VCONFKEY_LOCKSCREEN_CP_WIFIPOPUP_DONOTSHOWAGAIN, 1);
- }
-
- int value = 0;
- wallpaper_service_set_wifi_only_setting(value);
- WALLPAPERUI_DBG("value = %d",value);
-
- evas_object_del(popup);
- popup = NULL;
-
- WALLPAPERUI_TRACE_END;
-}
-
-static void create_wifi_check_popup(void)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup;
- Evas_Object *layout;
- Evas_Object *btn;
- Evas_Object *label;
- Evas_Object *check;
- //Evas_Object *win = data;
-
- if(ug_data == NULL) {
- WALLPAPERUI_ERR("ug_data is NULL");
- return;
- }
-
- popup = elm_popup_add(ug_data->navi_bar);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_OPT_DISABLE_WI_FI_ONLY_ABB"));
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- /* layout */
- layout = elm_layout_add(popup);
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_wifi_check_layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_translatable_part_text_set(layout, "elm.text", APP_STRING("IDS_ST_BODY_DO_NOT_SHOW_AGAIN"));
-
-
- /* Cancle button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_translatable_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_CANCEL"));
- //ea_theme_object_color_replace(btn, "W011", "W0111");
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", _wifi_cancel_response_cb, popup);
-
- /*Disable button*/
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_DISABLE"));
- //ea_theme_object_color_replace(btn, "W011", "W0111");
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", _wifi_disable_response_cb, popup);
-
- /* check */
- check = elm_check_add(popup);
- elm_object_style_set(check, "popup");
- //elm_object_text_set(check, "Do not show again");
- elm_object_translatable_text_set(check,APP_STRING("IDS_ST_BODY_DO_NOT_SHOW_AGAIN"));
- evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_content_set(layout, "elm.swallow.end", check);
-
- evas_object_data_set(popup, "check", check);
-
- /* label */
- label = elm_label_add(layout);
- elm_object_style_set(label, "popup/default");
- elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- elm_object_text_set(label, APP_STRING("IDS_ST_POP_CONNECTING_VIA_MOBILE_NETWORK_MAY_INCUR_ADDITIONAL_CHARGES_DEPENDING_ON_YOUR_PAYMENT_PLAN"));
- evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(label);
- elm_object_part_content_set(layout, "elm.swallow.content", label);
-
- elm_object_content_set(popup, layout);
-
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, create_wifi_check_popup);
-}
-
-static void _Disable_wifi_click_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_wallpaper_ug_data *ugd;
- ugd = (cp_wallpaper_ug_data *)data;
- int value1 = 0;
- int value2 = 0;
-
- if(ugd->more_popup) {
- evas_object_del(ugd->more_popup);
- ugd->more_popup = NULL;
- }
-
- vconf_get_bool(VCONFKEY_LOCKSCREEN_CP_WIFIPOPUP_DONOTSHOWAGAIN, &value1);
- if(value1 == 0) {
- create_wifi_check_popup();
- }
- else
- {
- wallpaper_service_set_wifi_only_setting(value2);
- }
- WALLPAPERUI_TRACE_END;
-}
-
-static void _Enable_wifi_click_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- cp_wallpaper_ug_data *ugd;
- ugd = (cp_wallpaper_ug_data *)data;
- int value = 1;
-
- if(ugd->more_popup) {
- evas_object_del(ugd->more_popup);
- ugd->more_popup = NULL;
- }
- wallpaper_service_set_wifi_only_setting(value);
-
- WALLPAPERUI_TRACE_END;
-}
-
-static void popup_enable_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = data;
- if(!popup) {
- return;
- }
-
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void popup_enable_enable_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = data;
- if(!popup) {
- return;
- }
- int value = 1;
- wallpaper_service_set_verfication(value);
-
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void _enhanced_popup_create(void);
-
-static void _Enable_service_click_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(ug_data == NULL) {
- WALLPAPERUI_ERR("ug_data is NULL");
- return;
- }
-
- Evas_Object *popup;
- Evas_Object *btn;
-
- if(ug_data->more_popup) {
- evas_object_del(ug_data->more_popup);
- ug_data->more_popup = NULL;
- }
-
- /* popup */
- popup = elm_popup_add(ug_data->navi_bar);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- elm_object_translatable_text_set(popup, APP_STRING("MIDS_LSM_MSG_TO_PROVIDE_YOU_WITH_A_MORE_ENHANCED_EXPERIENCE_MSG"));
- elm_object_translatable_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_OPT_ENABLE_ENHANCED_SERVICE_ABB"));
-
- /* cancle button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_translatable_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_CANCEL"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_enable_cancel_clicked_cb, popup);
-
- /* enable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_ENABLE"));
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_enable_enable_clicked_cb, popup);
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _enhanced_popup_create);
- WALLPAPERUI_TRACE_END;
-}
-
-static void _enhanced_popup_create(void)
-{
- _Enable_service_click_cb(NULL, NULL, NULL);
-}
-
-static void popup_disable_cancel_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = data;
- if(!popup) {
- return;
- }
-
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void popup_disable_enable_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *popup = data;
- if(!popup) {
- return;
- }
- int value = 0;
- wallpaper_service_set_verfication(value);
-
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void _disable_popup_create(void);
-
-static void _Disbale_service_click_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(ug_data == NULL) {
- WALLPAPERUI_ERR("ug_data is NULL");
- return;
- }
-
- if(ug_data->more_popup) {
- evas_object_del(ug_data->more_popup);
- ug_data->more_popup = NULL;
- }
-
- Evas_Object *popup;
- Evas_Object *btn;
-
- /* popup */
- popup = elm_popup_add(ug_data->navi_bar);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_translatable_text_set(popup,APP_STRING("MIDS_LSM_POP_IF_YOU_DISABLE_ENHANCED_SERVICE_MSG"));
- elm_object_translatable_part_text_set(popup, "title,text", APP_STRING("IDS_LCKSCN_OPT_DISABLE_ENHANCED_SERVICE_ABB"));
-
-
- /* cancle button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_translatable_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_CANCEL"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_disable_cancel_clicked_cb, popup);
-
- /* disable button */
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, APP_STRING("IDS_ST_BUTTON_DISABLE"));
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", popup_disable_enable_clicked_cb, popup);
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, _disable_popup_create);
- WALLPAPERUI_TRACE_END;
-}
-
-static void _disable_popup_create(void)
-{
- if(ug_data) {
- _Disbale_service_click_cb(NULL, NULL, NULL);
- } else {
- WALLPAPERUI_ERR("ug_data is NULL");
- }
-}
-
-static void _lockscreen_more_menu_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *more_ctxpopup = NULL;
- cp_wallpaper_ug_data *ugd;
-
- ugd = (cp_wallpaper_ug_data *)data;
- if(ugd == NULL)
- {
- WALLPAPERUI_DBG("ugd is null");
- return;
- }
- more_ctxpopup = elm_ctxpopup_add(ugd->navi_bar);
- ugd->more_popup = more_ctxpopup;
- ea_object_event_callback_add(more_ctxpopup,
- EA_CALLBACK_BACK, _lockscreen_more_popup_back_cb, ugd);
- ea_object_event_callback_add(more_ctxpopup,
- EA_CALLBACK_MORE, _lockscreen_more_popup_more_cb, ugd);
- elm_object_style_set(more_ctxpopup, "more/default");
- elm_ctxpopup_auto_hide_disabled_set(more_ctxpopup, EINA_TRUE);
-
- int value = 0;
- wallpaper_service_get_verfication(&value);//0 : disable 1:enable
- int value_wifi = 0;
- wallpaper_service_get_wifi_only_setting(&value_wifi);
- WALLPAPERUI_DBG("value = %d,value_wifi = %d",value,value_wifi);
-
- int i = 1;
- for(i = 1; i <= 4; i++)
- {
- if (1==i)
- {
- elm_ctxpopup_item_append(more_ctxpopup, APP_STRING("IDS_LCKSCN_OPT_TRANSITION_INTERVAL_ABB"), NULL, _interval_click_cb, ugd);
-
- }
- else if(2==i)
- {
- if(1 == value_wifi)
- {
- elm_ctxpopup_item_append(more_ctxpopup, APP_STRING("IDS_LCKSCN_OPT_DISABLE_WI_FI_ONLY_ABB"), NULL, _Disable_wifi_click_cb, ugd);
- }
- else
- {
- elm_ctxpopup_item_append(more_ctxpopup, APP_STRING("IDS_LCKSCN_OPT_ENABLE_WI_FI_ONLY_ABB"), NULL, _Enable_wifi_click_cb, ugd);
- }
- }
- else if(3==i)
- {
- if(0 == value)//disbale
- {
- elm_ctxpopup_item_append(more_ctxpopup, APP_STRING("IDS_LCKSCN_OPT_ENABLE_ENHANCED_SERVICE_ABB"), NULL, _Enable_service_click_cb, ugd);
- break;
- }
- else //enable
- {
- }
- }
- else
- {
- if(1 == value)
- {
- elm_ctxpopup_item_append(more_ctxpopup, APP_STRING("IDS_LCKSCN_OPT_DISABLE_ENHANCED_SERVICE_ABB"), NULL, _Disbale_service_click_cb, ugd);
- }
- }
- }
-
- evas_object_smart_callback_add(more_ctxpopup, "dismissed",
- _lockscreen_more_popup_dismiss_cb, ugd);
- evas_object_smart_callback_add(elm_object_top_widget_get(more_ctxpopup),
- "rotation,changed",
- _lockscreen_more_popup_rotate_cb, ugd);
- evas_object_event_callback_add(more_ctxpopup, EVAS_CALLBACK_DEL,
- _lockscreen_more_popup_delete_cb, ugd->navi_bar);
-
- elm_ctxpopup_direction_priority_set(more_ctxpopup, ELM_CTXPOPUP_DIRECTION_UP,
- ELM_CTXPOPUP_DIRECTION_DOWN,
- ELM_CTXPOPUP_DIRECTION_UNKNOWN,
- ELM_CTXPOPUP_DIRECTION_UNKNOWN);
-
- _wallpaper_move_ctxpopup(more_ctxpopup);
- evas_object_show(more_ctxpopup);
- WALLPAPERUI_TRACE_END;
-}
-
-static void _progress_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
-/* int error = wallpaper_service_deactivate();
- if(error != 0) {
- WALLPAPERUI_DBG("wallpaper_service_deactivate fail.");
- }*/
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- if(ug_data->popup_progress != NULL) {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
- //elm_naviframe_item_pop_to(ug_data->navi_main_item);
- elm_naviframe_item_pop(ug_data->navi_bar);
-}
-
-static void _progress_delete_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- if(ug_data->popup_progress != NULL) {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
-}
-#if 0
-static void _progress_bar_delete_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- cp_wallpaper_ug_data * ug_data = (cp_wallpaper_ug_data *)data;
- if(ug_data->popup_progress != NULL) {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
-}
-#endif
-void create_loading_popup()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(ug_data->popup_progress != NULL )
- {
- evas_object_del(ug_data->popup_progress);
- ug_data->popup_progress = NULL;
- }
-
- Evas_Object *popup = elm_popup_add(ug_data->navi_bar);
- ug_data->popup_progress = popup;
- // elm_object_style_set(popup, "no_effect");
- evas_object_event_callback_add(ug_data->popup_progress, EVAS_CALLBACK_DEL, _progress_delete_cb, ug_data);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK,_progress_response_cb, ug_data);
-
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- Evas_Object *layout = elm_layout_add(popup);
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "processing_view");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- // [UI] progress icon
- Evas_Object *progressbar = elm_progressbar_add(popup);
- elm_object_style_set(progressbar, "process_medium"); /* "toolbar_process" or "pending_list" or "list_prosess" */
- evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
- evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_progressbar_pulse(progressbar, EINA_TRUE);
- elm_object_part_content_set(layout, "processing", progressbar);
-
- // [UI] text
- elm_object_part_text_set(layout, "elm.text", APP_STRING("IDS_ST_POP_LOADING_ING"));
-
- elm_object_content_set(popup, layout);
-
- elm_object_style_set(popup, "no_effect");
-#if 0
- Evas_Object *box = elm_box_add(popup);
- elm_box_horizontal_set(box, EINA_TRUE);
- evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_align_set(box, 0.5, 0.5);
- elm_box_padding_set(box, 16, 0);
-
- Evas_Object *progressbar = elm_progressbar_add(box);
- //evas_object_event_callback_add(progressbar, EVAS_CALLBACK_DEL, _progress_bar_delete_cb, ug_data);
- elm_object_style_set(progressbar, "process_large");
- elm_progressbar_pulse(progressbar, EINA_TRUE);
- evas_object_show(progressbar);
- elm_box_pack_end(box, progressbar);
-
- Evas_Object *label = elm_label_add(popup);
- elm_object_text_set( label, APP_STRING("IDS_ST_POP_LOADING_ING"));
- evas_object_show(label);
- elm_box_pack_end(box, label);
-
-// evas_object_show(box);
-// elm_object_content_set(popup, box);
-
- Evas_Object *table = elm_table_add(popup);
- evas_object_show(table);
- elm_table_homogeneous_set(table, EINA_FALSE);
-
- Evas_Object *rect_up;
- rect_up = evas_object_rectangle_add(evas_object_evas_get(popup));
- evas_object_size_hint_min_set(rect_up, ELM_SCALE_SIZE(100), ELM_SCALE_SIZE(20));
-
- Evas_Object *rect_down;
- rect_down = evas_object_rectangle_add(evas_object_evas_get(popup));
- evas_object_size_hint_min_set(rect_down, ELM_SCALE_SIZE(100), ELM_SCALE_SIZE(20));
-
- // box
- elm_table_pack(table, rect_up, 0, 0, 2, 1);// rect as a padding
- elm_table_pack(table, box, 0, 1, 2, 1);
- elm_table_pack(table, rect_down, 0, 2, 2, 1);// rect as a padding
- evas_object_show(box);
-
- elm_object_content_set(popup, table);
-#endif
-
- evas_object_show(popup);
-
- display_popup = popup;
- evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _del_cb, NULL);
- evas_object_data_set(popup, POPUP_CREATE_FUNC_HANDLE, create_loading_popup);
-}
-#if 0
-static void cp_wallpaper_back_key_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- ret_if(!data);
-
- if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }
-
- //elm_naviframe_item_pop(ug_data->navi_bar);
-}
-#endif
-static Eina_Bool _cp_wallpaper_pop_cb(void *data, Elm_Object_Item *it)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(data){
- cp_wallpaper_ug_data *ug_data = (cp_wallpaper_ug_data *)data;
-
- /*if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }*/
- if (ug_data) {
- ea_object_event_callback_del(ug_data->navi_bar, EA_CALLBACK_MORE, _lockscreen_more_menu_cb);
- }
- }
- return EINA_TRUE;
-}
-
-
-void cp_wallpaper_main_create_view()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- ug_data->category_received = 0;
- ug_data->navi_setting_item = NULL;
-
- WALLPAPERUI_DBG("wallpaper_service_activate_async start\n");
- int err_code = wallpaper_service_activate_async(__wallpaper_service_activate_cb, ug_data);
- WALLPAPERUI_DBG("wallpaper_service_activate_async end: err_code = %d\n", err_code);
-
- if (WALLPAPER_SERVICE_ERROR_NONE != err_code) {
- //ERROR POPUP
- //elm_object_item_disabled_set(cancel_btn, EINA_TRUE);
- //elm_object_item_disabled_set(done_btn, EINA_TRUE);
- WALLPAPERUI_ERR("wallpaper_service_activate failed\n");
- _create_no_network_popup();
-// _create_network_error_popup(ug_data);
- return;
- }
-
- if(ug_data->category_received == 0) {
- create_loading_popup();
- }
-
- main_layout = cp_wallpaper_util_create_layout(ug_data->navi_bar, EDJDIR"/popup-wallpaper.edj", "cp.wallpaper.main");
- //cp_gengrid = cp_gengrid_add(layout);
- //elm_object_part_content_set(layout, "cp", cp_gengrid);
- ug_data->layout_main = main_layout;
-
- //ea_object_event_callback_add(ug_data->navi_bar, EA_CALLBACK_BACK, cp_wallpaper_back_key_cb, (void*)ug_data);
- cp_navi_item = elm_naviframe_item_push(ug_data->navi_bar, navi_title, NULL, NULL, main_layout, NULL);
- elm_naviframe_item_pop_cb_set(cp_navi_item, _cp_wallpaper_pop_cb, (void*)ug_data);
- elm_object_item_domain_text_translatable_set(cp_navi_item, PKGNAME, EINA_TRUE);
- //elm_naviframe_item_pop_cb_set(cp_navi_item, _cpwallpaper_pop_cb, ug_data);
- //cp_wallpaper_create_genlist(layout,ug_data);
- ug_data->navi_main_item = cp_navi_item;
-
- Evas_Object *more_btn = NULL;
- more_btn = elm_button_add(ug_data->navi_bar);
- elm_object_style_set(more_btn, "naviframe/more/default");
- ea_object_event_callback_add(ug_data->navi_bar, EA_CALLBACK_MORE, _lockscreen_more_menu_cb, ug_data);
- elm_object_item_part_content_set(cp_navi_item, "toolbar_more_btn", more_btn);
-
- /* Title Cancel Button */
- Evas_Object *cancel_btn = elm_button_add(ug_data->navi_bar);
- elm_object_style_set(cancel_btn, "naviframe/title_text_left");
- elm_object_text_set(cancel_btn, APP_STRING("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"));
- evas_object_smart_callback_add(cancel_btn, "clicked", cp_cancel_button_cb, NULL);
- elm_object_item_part_content_set(cp_navi_item, "title_left_text_btn", cancel_btn);
-
- /* Title Done Button */
- done_btn = elm_button_add(ug_data->navi_bar);
- elm_object_style_set(done_btn, "naviframe/title_text_right");
- elm_object_text_set(done_btn, APP_STRING("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
- evas_object_smart_callback_add(done_btn, "clicked", cp_done_button_cb, NULL);
- elm_object_item_part_content_set(cp_navi_item, "title_right_text_btn", done_btn);
-
- WALLPAPERUI_DBG("default_clicked_cb end");
-}
-
-Evas_Object *cp_wallpaper_util_create_layout(Evas_Object * parent, const char *file, const char *group)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Evas_Object *layout = NULL;
-
- if (parent == NULL) {
- WALLPAPERUI_DBG("Parent is null.");
- return NULL;
- }
-
- layout = elm_layout_add(parent);
- if (layout == NULL) {
- WALLPAPERUI_DBG("Cannot add layout.");
- return NULL;
- }
-
- if ((file != NULL) && (group != NULL)) {
- elm_layout_file_set(layout, file, group);
- }
-
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- evas_object_show(layout);
-
- return layout;
-}
-
-void cp_wallpaper_popup_language_change(void)
-{
- void (*func)(void) = NULL;
-
- if(display_popup) {
- func = evas_object_data_get(display_popup, POPUP_CREATE_FUNC_HANDLE);
- evas_object_del(display_popup);
- display_popup = NULL;
- }
-
- if(func) {
- func();
- }
-}
diff --git a/src/cp-wallpaper-main.h b/src/cp-wallpaper-main.h
deleted file mode 100755
index ca754b0..0000000
--- a/src/cp-wallpaper-main.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * cp-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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.
- *
- */
-
-#ifndef __CP_WALLPAPER_MAIN_H__
-#define __CP_WALLPAPER_MAIN_H__
-
-#include <Elementary.h>
-#include "wallpaper-ui-service.h"
-#include <ui-gadget.h>
-
-#ifndef VCONFKEY_LOCKSCREEN_CP_FIRST_SET
-#define VCONFKEY_LOCKSCREEN_CP_FIRST_SET "db/lockscreen/cp_first_set"
-#endif
-
-//#ifndef VCONFKEY_LOCKSCREEN_CP_ENHANCED_SERVICE
-//#define VCONFKEY_LOCKSCREEN_CP_ENHANCED_SERVICE "db/lockscreen/cp_enhanced_service"
-//#endif
-
-#ifndef VCONFKEY_LOCKSCREEN_CP_SETPOPUP_DONOTSHOWAGAIN
-#define VCONFKEY_LOCKSCREEN_CP_SETPOPUP_DONOTSHOWAGAIN "db/lockscreen/cp_setpopup_donotshowagain"
-#endif
-
-#ifndef VCONFKEY_LOCKSCREEN_CP_WIFIPOPUP_DONOTSHOWAGAIN
-#define VCONFKEY_LOCKSCREEN_CP_WIFIPOPUP_DONOTSHOWAGAIN "db/lockscreen/cp_wifipopup_donotshowagain"
-#endif
-
-#ifndef VCONFKEY_LOCKSCREEN_CP_CHANGE_CATEGORY_DONOTSHOWAGAIN
-#define VCONFKEY_LOCKSCREEN_CP_CHANGE_CATEGORY_DONOTSHOWAGAIN "db/lockscreen/cp_changecategorypopup_donotshowagain"
-#endif
-
-typedef struct {
- Evas_Object *content;
-
- Elm_Object_Item *item;
- char* path;
- char* name;
- char* code;
- int index;
- int check_index;
- Evas_Object *del;
- Evas_Object *check;
- Eina_Bool check_state;
- Eina_Bool pre_state;
- void* data;
-} cp_grid_item_s;
-
-typedef struct _cp_wallpaper_ug_data {
- Evas_Object *win_main;
- Evas_Object *layout_main;
- Evas_Object *base;
- Evas_Object *popup;
- Evas_Object *popup_progress;
- Evas_Object *btn;
- Evas_Object *btn2;
- ui_gadget_h ug;
- Evas_Object *navi_bar;
- Evas_Object *navi_main_item;
- Evas_Object *navi_setting_item;
- Evas_Object *navi_enhanced_item;
- Evas_Object *check_clear;
- int category_received;
- Evas_Object *more_popup;
-} cp_wallpaper_ug_data;
-
-void cp_wallpaper_main(wallpaper_ui_service_appdata *data);
-Evas_Object *cp_wallpaper_util_create_layout(Evas_Object * parent, const char *file, const char *group);
-static void cp_radio_change(void *data, Evas_Object *obj, void *event_info);
-static char* gl_radio_text_get_cb(void *data, Evas_Object *obj, const char *part);
-static Evas_Object* gl_radio_content_get_cb(void *data, Evas_Object *obj, const char *part);
-static void gl_radio_sel_cb(void *data, Evas_Object *obj, void *event_info);
-void cpwallpaper_changing_TA_launch_request();
-void cp_wallpaper_popup_language_change(void);
-
-#endif /* __CP_WALLPAPER_MAIN_H__ */
diff --git a/src/festival-wallpaper.c b/src/festival-wallpaper.c
deleted file mode 100755
index 6d42440..0000000
--- a/src/festival-wallpaper.c
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * starter
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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 <Ecore_X.h>
-#include <vconf.h>
-#include <vconf-keys.h>
-#include <efl_assist.h>
-#include <feedback.h>
-#include <app_alarm.h>
-#include <system_settings.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include <calendar.h>
-
-#include "wallpaper-ui-service-debug.h"
-#include "festival-wallpaper.h"
-
-
-//#define ICON_DIR "/usr/ug/res/images/ug-lockscreen-options-efl"
-//efine ICON_DIR "/usr/apps/org.tizen.wallpaper-ui-service/res/images/"
-#define VCONF_LOCKSCREEN_FESTIVAL_INDEX "db/lockscreen/pre_wallpaper_type" // int : save festival wallpaper idx
-#define VCONF_LOCKSCREEN_FESTIVAL_BGSET "db/lockscreen/pre_bgset" // string : save festival wallpaper location
-#define LOCKSCREEN_FESTIVAL_DISMISS "__DISMISS__"
-#define LOCKSCREEN_FESTIVAL_NONE "__NONE__"
-
-#define VCONFKEY_FESTIVAL_EVENTS_LIST "db/lockscreen/festival_wallpaper_enable_string"
-
-
-#define MAX_FESTIVAL 17
-
-typedef struct {
- char* name;
- int b_on;
-
- int duration;
- time_t from_time;
- time_t to_time;
-} festival_day_info;
-
-festival_day_info day_info[MAX_FESTIVAL] =
-{
- {"Milad-un-Nabi", 1, 1, 0, 0},
- {"Republic Day", 1, 1, 0, 0},
- {"Holi", 1, 1, 0, 0},
- {"Ram Navami", 1, 1, 0, 0},
- {"Mahavir Jayanti", 1, 1, 0, 0},
- {"Good Friday", 1, 1, 0, 0},
- {"Buddha Purnima", 1, 1, 0, 0},
- {"Idul Fitr", 1, 1, 0, 0},
- {"Independence Day", 1, 1, 0, 0},
- {"Janmashtami", 1, 1, 0, 0},
- {"Idul Juha", 1, 1, 0, 0},
- {"Mahatma Gandhi Birthday", 1, 1, 0, 0},
- {"Dussehra", 1, 1, 0, 0},
- {"Muharram (10th Day)", 1, 1, 0, 0},
- {"Deewali", 1, 5, 0, 0},
- {"Guru Nanak's Birthday", 1, 1, 0, 0},
- {"Christmas Day", 1, 5, 0, 0},
-};
-
-static const char *icon_path[] = {
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/01_Milad-un-Nabi.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/02_Republic_Day.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/03_Holi.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/04_Ram-Navami.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/16_Mahavir_Jayanti.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/05_Good_Friday.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/06_Buddha.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/07_Id-Ul-Fitr.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/08_IndependenceDay.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/10_Janmashtami.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/09_Id-ul-Juha.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/12_Mahatma_Gandhi_Jayanti.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/11_Dussehra.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/14_Muharram.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/13_Diwali.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/17_Guru_Nanak.jpg",
- "/opt/usr/apps/org.tizen.wallpaper-ui-service-lite/data/wallpaper/festival/15_Christmas.jpg",
-};
-
-static void set_festival_as_value(void* data, int festival_value)
-{
-#if 0
- int wallpaper_type = 0;
- char* value = NULL;
-
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE,&wallpaper_type);
-
- if(wallpaper_type!=LOCKSCREEN_WALLPAPER_TYPE_FESTIVAL)
- {
- vconf_set_int(VCONF_LOCKSCREEN_FESTIVAL_INDEX,wallpaper_type);
- }
- else
- {
- WALLPAPERUI_ERR("set pre type failed =%d", wallpaper_type);
- }
-
- WALLPAPERUI_DBG("festival_wallpaper_handle pre(%d) current(%d)",wallpaper_type,LOCKSCREEN_WALLPAPER_TYPE_FESTIVAL);
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) == SYSTEM_SETTINGS_ERROR_NONE) {
- WALLPAPERUI_ERR("SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN:get value=%s", value);
- }
-
- if(wallpaper_type!=LOCKSCREEN_WALLPAPER_TYPE_FESTIVAL)
- {
- vconf_set_str(VCONF_LOCKSCREEN_FESTIVAL_BGSET,value);
- }
- else
- {
- WALLPAPERUI_ERR("set pre bgset failed =%d", value);
- }
-
- //backup
- //set
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, LOCKSCREEN_WALLPAPER_TYPE_FESTIVAL);
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN,icon_path[festival_value]) == SYSTEM_SETTINGS_ERROR_NONE) {
- WALLPAPERUI_ERR("SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN:set value=%s", icon_path[festival_value]);
- }
- //notification_status_message_post(_("IDS_ST_POP_LOCK_SCREEN_WALLPAPER_CHANGED_ABB"));
-#endif
-
- int idx = 0;
- char *festival_wallpaper = NULL;
- festival_wallpaper = vconf_get_str(VCONF_LOCKSCREEN_FESTIVAL_BGSET);
- vconf_get_int(VCONF_LOCKSCREEN_FESTIVAL_BGSET, &idx);
- if(festival_wallpaper && strcmp(festival_wallpaper, LOCKSCREEN_FESTIVAL_DISMISS) == 0 && idx == festival_value) {
- WALLPAPERUI_ERR("%d is dismissed", idx);
- } else {
- vconf_set_str(VCONF_LOCKSCREEN_FESTIVAL_BGSET, icon_path[festival_value]);
- vconf_set_int(VCONF_LOCKSCREEN_FESTIVAL_INDEX, festival_value);
- }
- if(festival_wallpaper!=NULL)
- {
- FREE(festival_wallpaper);
- }
-}
-
-static void reset_as_previous(void* data)
-{
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- vconf_set_str(VCONF_LOCKSCREEN_FESTIVAL_BGSET, LOCKSCREEN_FESTIVAL_NONE);
- vconf_set_int(VCONF_LOCKSCREEN_FESTIVAL_INDEX, -1);
-
-}
-void get_holiday_date(void* data)
-{
- int i = 0;
- char *checkinfo = NULL;
- checkinfo = vconf_get_str(VCONFKEY_FESTIVAL_EVENTS_LIST);
- WALLPAPERUI_DBG("checkinfo %s",checkinfo);
- if(checkinfo!=NULL)
- {
- char* temp = NULL;
- for(i=0;i<MAX_FESTIVAL;i++)
- {
- if(*(checkinfo+i) == '1')
- day_info[i].b_on = 1;
- else
- day_info[i].b_on = 0;
- }
- }
- if(checkinfo!=NULL)
- {
- FREE(checkinfo);
- }
-
- //get data from calendar svc
-}
-
-int check_today_is_holiday(void* data, int prev)
-{
- int i = 0;
- struct tm date;
- time_t now;
- time(&now);
- localtime_r(&now, &date);
- for(i=0;i<MAX_FESTIVAL;i++)
- {
-// struct tm date;
-// WALLPAPERUI_ERR("NEXT %d, %d, %d, %d, %d, %d,index %d b_on %d",date.tm_year,date.tm_mon,date.tm_mday,date.tm_hour,date.tm_min,date.tm_sec,i,b_on);
-// WALLPAPERUI_ERR("day_info[%d] $d %d, %d, %d",i,day_info[i].from_month,day_info[i].to_month,day_info[i].from_day,day_info[i].to_day,date.tm_min);
- if(i!=prev)//check for previous holiday
- {
- if(day_info[i].from_time >= now && now < day_info[i].to_time) {
- WALLPAPERUI_ERR("!!!today is holiday %d %s", i, day_info[i].name);
- set_festival_as_value(data, i);
- break;
- }
- }
- }
-
-}
-
-void set_alarm_by_date(struct tm* date,int index,int day)
-{
- WALLPAPERUI_ERR("NEXT %d, mon %d, day %d, hour %d, min %d, sec %d,index %d,day %d,name %s",date->tm_year,date->tm_mon,date->tm_mday,date->tm_hour,date->tm_min,date->tm_sec,index,day,day_info[day].name);
- int tid;
-
- app_control_h service;
- app_control_create(&service);
- app_control_set_app_id(service, "org.tizen.wallpaper-ui-service");
- app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
- app_control_add_extra_data(service, "popup_type", "festival");
- app_control_add_extra_data(service, EXTRA_KEY_FESTIVAL_TYPE, EXTRA_DATA_FESTIVAL_TRIGGER);
-
- if(index==0)//off
- {
- app_control_add_extra_data(service, EXTRA_KEY_FESTIVAL_TRIGGER, EXTRA_DATA_FESTIVAL_TRIGGER_OFF);
- }
- else
- {
- app_control_add_extra_data(service, EXTRA_KEY_FESTIVAL_TRIGGER, EXTRA_DATA_FESTIVAL_TRIGGER_ON);
- }
-
- char val[10] = {0,};
- snprintf(val,sizeof(val),"%d",day);
- app_control_add_extra_data(service, EXTRA_KEY_FESTIVAL_TRIGGER_VAL, val);
- int ret = alarm_schedule_at_date(service, date, 0, &tid);
- if(ret == ALARM_ERROR_NONE)
- {
-// WALLPAPERUI_ERR("NO ERROR");
- }
- else
- {
- WALLPAPERUI_ERR("ERROR(%d)", ret);
- }
- // app_control_send_launch_request(service,NULL,NULL);
- app_control_destroy(service);
-
-}
-void set_next_year_alarm(void)
-{
- struct tm date;
- int b_on = 1;
- time_t now;
- time(&now);
- localtime_r(&now, &date);
-
- int tid;
-
- app_control_h service;
- app_control_create(&service);
- app_control_set_app_id(service, "org.tizen.wallpaper-ui-service");
- app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
- app_control_add_extra_data(service, "popup_type", "festival");
- app_control_add_extra_data(service, EXTRA_KEY_FESTIVAL_TYPE, EXTRA_DATA_FESTIVAL_CREATE);
-
- date.tm_year = date.tm_year+1;
- date.tm_mon = 0;
- date.tm_mday = 1;
- date.tm_hour = 0;
- date.tm_min = 0;
- date.tm_sec = 0;
-
- WALLPAPERUI_ERR("NEXT year %d, mon %d, day %d, hour %d, min %d, sec %d",date.tm_year,date.tm_mon,date.tm_mday,date.tm_hour,date.tm_min,date.tm_sec);
-
- int ret = alarm_schedule_at_date(service, &date, 0, &tid);
- if(ret == ALARM_ERROR_NONE)
- {
-// WALLPAPERUI_ERR("NO ERROR");
- }
- else
- {
- WALLPAPERUI_ERR("ERROR(%d)", ret);
- }
-
- app_control_destroy(service);
-
-}
-int set_alarm_all(void* data)
-{
- int i = 0;
-// int b_plus_year = 0;
- get_holiday_date(data);
-
- int b_plus_year = 0;
- struct tm date;
- time_t now;
- time(&now);
- localtime_r(&now, &date);
-
- Eina_Bool is_today_festival = EINA_FALSE;
-
- WALLPAPERUI_ERR("today %d, %d, %d, %d, %d, %d,index %d b_on %d",date.tm_year,date.tm_mon,date.tm_mday,date.tm_hour,date.tm_min,date.tm_sec);
-
- int b_on_list[MAX_FESTIVAL];
-
- for(i=0;i<MAX_FESTIVAL;i++)
- {
- b_on_list[i] = 1;
-
- if(day_info[i].b_on==0)
- {
- WALLPAPERUI_DBG("SKIP unchecked event(%s) idx(%d)", day_info[i].name, i);
- b_on_list[i] = 0;
- continue;
- }
-
- if(day_info[i].from_time <= now && now < day_info[i].to_time) {
- WALLPAPERUI_ERR("!!!today is holiday %d %s", i, day_info[i].name);
- set_festival_as_value(data, i);
- b_on_list[i] = 0;
-
- /* end alarm */
- struct tm to_time;
- localtime_r(&day_info[i].to_time, &to_time);
- set_alarm_by_date(&to_time, b_on_list[i], i);
- is_today_festival = EINA_TRUE;
- } else if (day_info[i].from_time <= now) {
- WALLPAPERUI_DBG("SKIP previous event(%s) idx(%d) from(%d) now(%d) to(%d)", day_info[i].name, i, day_info[i].from_time, now, day_info[i].to_time);
- b_on_list[i] = 0;
- continue;
- }
- }
-
- if(!is_today_festival)
- {
- reset_as_previous(data);
- }
-
- /* set alarms */
- for(i=0;i<MAX_FESTIVAL;i++)
- {
- if(b_on_list[i] == 1)//on
- {
- int index = 0;
- for(index=0; index<2 ;index++)
- {
- if(index==0)
- {
- // to
- localtime_r(&day_info[i].to_time, &date);
- }
- else
- {
- // from
- localtime_r(&day_info[i].from_time, &date);
- }
- set_alarm_by_date(&date, index, i);
- }
- }
- }
-
- set_next_year_alarm();
-
- return 0;
-}
-
-calendar_query_h _create_range_list_query()
-{
- const char* uri = _calendar_instance_localtime_calendar_book_extended._uri ;
- const unsigned int startProperty = _calendar_instance_localtime_calendar_book_extended.start_time;
-
- calendar_query_h query = NULL;
- calendar_query_create(uri, &query);
-
- calendar_filter_h filter = NULL;
- calendar_filter_create(uri, &filter);
-
- struct tm tm_start;
- time_t now = time(NULL);
- localtime_r(&now, &tm_start);
-
- // time filter
- calendar_time_s fromTime;
- fromTime.type = CALENDAR_TIME_LOCALTIME;
- fromTime.time.date.year = tm_start.tm_year+1900;
- fromTime.time.date.month = 1;
- fromTime.time.date.mday = 1;
- fromTime.time.date.hour = 0;
- fromTime.time.date.minute = 0;
- fromTime.time.date.second = 0;
- fromTime.time.date.is_leap_month = false;
-
- calendar_time_s toTime;
- toTime.type = CALENDAR_TIME_LOCALTIME;
- toTime.time.date.year = tm_start.tm_year+1900+1;
- toTime.time.date.month = 1;
- toTime.time.date.mday = 1;
- toTime.time.date.hour = 0;
- toTime.time.date.minute = 0;
- toTime.time.date.second = 0;
- toTime.time.date.is_leap_month = false;
-
- calendar_filter_add_caltime(filter, startProperty, CALENDAR_MATCH_GREATER_THAN_OR_EQUAL, fromTime);
- calendar_filter_add_operator(filter, CALENDAR_FILTER_OPERATOR_AND);
- calendar_filter_add_caltime(filter, startProperty, CALENDAR_MATCH_LESS_THAN, toTime);
-
- // string filter
- calendar_filter_add_operator(filter, CALENDAR_FILTER_OPERATOR_AND);
- calendar_filter_add_str(filter,_calendar_instance_localtime_calendar_book_extended.sync_data2,CALENDAR_MATCH_FULLSTRING, "FESTIVAL");
-
- calendar_query_set_filter(query, filter);
- calendar_filter_destroy(filter);
-
- calendar_query_set_sort(query, startProperty, true);
-
- return query;
-}
-
-int _festival_date_find(const char *name)
-{
- int i = 0;
-
- for(i = 0; i < MAX_FESTIVAL; i++) {
- if(strstr(name, day_info[i].name) != NULL) {
- return i;
- }
- }
- return -1;
-}
-
-void festival_date_get_from_calendar(void)
-{
- calendar_connect();
-
- calendar_query_h query = _create_range_list_query();
- if (query == NULL) {
- WALLPAPERUI_ERR("_create_range_list_query() failed");
- return;
- }
-
- calendar_list_h list = NULL;
- int error = calendar_db_get_records_with_query(query, 0, 0, &list);
- if (error != CALENDAR_ERROR_NONE) {
- WALLPAPERUI_ERR("calendar_db_get_records_with_query() failed");
- return;
- }
-
- if (list != NULL) {
- int count = 0;
- int i = 0;
- calendar_list_first(list);
- error = calendar_list_get_count(list, &count);
- if (error != CALENDAR_ERROR_NONE) {
- WALLPAPERUI_ERR("calendar_list_get_count() failed");
- return;
- }
-
- for (i = 0; i < count; i++)
- {
- calendar_record_h record2 = NULL;
-
- error = calendar_list_get_current_record_p(list, &record2);
- if (error != CALENDAR_ERROR_NONE) {
- WALLPAPERUI_ERR("calendar_list_get_current_record_p() failed");
- }
-
- if (record2) {
- char * tmp = NULL;
- calendar_record_get_str_p(record2, _calendar_instance_localtime_calendar_book_extended.summary ,&tmp);
- if (tmp) {
-
- /* TODO : tmp can be changed for multi languages */
- int index = _festival_date_find(tmp);
- if(index != -1) {
- calendar_time_s start;
- calendar_record_get_caltime(record2, _calendar_instance_localtime_calendar_book_extended.start_time, &start);
- if(start.type == CALENDAR_TIME_LOCALTIME) {
-
- struct tm temp_tm;
- temp_tm.tm_year = start.time.date.year-1900;
- temp_tm.tm_mon = start.time.date.month-1;
- temp_tm.tm_mday = start.time.date.mday;
- temp_tm.tm_hour = 0;
- temp_tm.tm_min = 0;
- temp_tm.tm_sec = 0;
-
- WALLPAPERUI_DBG("name(%s) y(%d) m(%d) d(%d)", tmp, start.time.date.year, start.time.date.month, start.time.date.mday);
-
- day_info[index].from_time = mktime(&temp_tm);
-
- //temp_tm.tm_mday += day_info[index].duration-1;
- temp_tm.tm_mday += day_info[index].duration;
-
- day_info[index].to_time = mktime(&temp_tm);
-
- //WALLPAPERUI_DBG("from(%d) to(%d)", day_info[index].from_time, day_info[index].to_time);
- }
- } else {
- WALLPAPERUI_ERR("There is no date(%s)", tmp);
- }
- }
- }
-
- calendar_list_next(list);
- }
- calendar_list_destroy(list,true);
- }
-
- calendar_disconnect();
-}
-
-void festival_wallpaper_handle(app_control_h service, void * data)
-{
- WALLPAPERUI_DBG("festival_wallpaper_handle begin");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- if(ad->festival_data.festival_type == WALLPAPER_FESTIVAL_TYPE_CREATE)
- {
- int i = 0;
- alarm_cancel_all();
- festival_date_get_from_calendar();
- set_alarm_all(data);
- }
- else if(ad->festival_data.festival_type == WALLPAPER_FESTIVAL_TYPE_DELETE)
- {
- alarm_cancel_all();
- reset_as_previous(data);
- }
- else if(ad->festival_data.festival_type == WALLPAPER_FESTIVAL_TYPE_TRIGGER)
- {
- char* trigger_type = NULL;
- char* trigger_val = NULL;
-
- int type = 0;
- int val = 0;
- app_control_get_extra_data(service, EXTRA_KEY_FESTIVAL_TRIGGER, &trigger_type);
- if(trigger_type!=NULL)
- {
- WALLPAPERUI_ERR("EXTRA_KEY_FESTIVAL_TRIGGER %s",trigger_type);
- if(strcmp(trigger_type, EXTRA_DATA_FESTIVAL_TRIGGER_ON)==0)
- {
- type = 1;
- }
- else if(strcmp(trigger_type, EXTRA_DATA_FESTIVAL_TRIGGER_OFF)==0)
- {
- type = 0;
- }
- free(trigger_type);
- }
- else
- {
- type = 0;
- }
-
- app_control_get_extra_data(service, EXTRA_KEY_FESTIVAL_TRIGGER_VAL, &trigger_val);
- if(trigger_val!=NULL)
- val = atoi(trigger_val);
-
- WALLPAPERUI_DBG("festival_wallpaper_handle %d %d",type,val);
- if(val<0 || val>MAX_FESTIVAL)
- {
- val = 0;
- }
-
- if(type==1)
- {
- set_festival_as_value(data,val);
-// set_alarm_nearest_date_index(data,val);
- }
- else
- {
- reset_as_previous(data);
- check_today_is_holiday(data,val);
-// set_alarm_nearest_date_index(data,0);
- }
-
- }
-
- WALLPAPERUI_DBG("festival_wallpaper_handle end");
-}
diff --git a/src/festival-wallpaper.h b/src/festival-wallpaper.h
deleted file mode 100755
index dbe6031..0000000
--- a/src/festival-wallpaper.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * popup-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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.
- *
- */
-
-#ifndef __POPUP_WALLPAPER_MAIN_H__
-#define __POPUP_WALLPAPER_MAIN_H__
-
-#include <app.h>
-#include <Elementary.h>
-#include "wallpaper-ui-service.h"
-
-void festival_wallpaper_handle(app_control_h, void * data);
-
-
-#endif /* __POPUP_WALLPAPER_MAIN_H__ */
diff --git a/src/popup-color-theme-main.c b/src/popup-color-theme-main.c
deleted file mode 100755
index d04a8ab..0000000
--- a/src/popup-color-theme-main.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- *
- * Copyright (c) 2000 - 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 <vconf.h>
-#include <efl_assist.h>
-#include <app_control.h>
-
-#include "wallpaper-ui-service-debug.h"
-#include "wallpaper-ui-service.h"
-#include "wallpaper-ui-service-main.h"
-
-
-static void _popup_color_theme_button1_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG();
-
- wallpaper_ui_service_appdata *ad = data;
- ret_if(ad == NULL);
-
- int ret = 0;
-
-/* app_control_h setting_svc = NULL;
- ret = app_control_create(&setting_svc);
- if(ret != 0) {
- WALLPAPERUI_ERR("app_control_create() failed");
- return;
- }
- ret = app_control_set_operation(setting_svc, APP_CONTROL_OPERATION_DEFAULT);
- if(ret != 0) {
- WALLPAPERUI_ERR("app_control_set_operation() failed");
- app_control_destroy(setting_svc);
- return;
- }
- ret = app_control_set_package(setting_svc, "setting-color-theme-efl");
- if(ret != 0) {
- WALLPAPERUI_ERR("app_control_set_package() failed");
- app_control_destroy(setting_svc);
- return;
- }
- ret = app_control_send_launch_request(setting_svc, NULL, NULL);
- if(ret != 0) {
- WALLPAPERUI_ERR("app_control_send_launch_request() failed");
- app_control_destroy(setting_svc);
- return;
- }
- app_control_destroy(setting_svc);*/
-
- WALLPAPERUI_DBG("from %d",ad->sel_popup_data.launch_from);
-
- if(ad->sel_popup_data.launch_from == WALLPAPER_POPUP_FROM_GALLERY)
- {
- util_wallpaper_set(data);
- reply_to_sender(ad,APP_CONTROL_RESULT_SUCCEEDED);
- elm_exit();
- }
- else
- {
- if(ad->color_popup_data.popup) {
- evas_object_del(ad->color_popup_data.popup);
- ad->color_popup_data.popup = NULL;
- }
- }
-
-}
-
-static void _popup_color_theme_button2_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG();
-
- wallpaper_ui_service_appdata *ad = data;
- ret_if(ad == NULL);
-
- if(ad->color_popup_data.file_path != NULL) {
- WALLPAPERUI_DBG("ad->color_popup_data.file_path %s",ad->color_popup_data.file_path);
- int theme_index = 0; // default = 0
- theme_index = ea_theme_suitable_theme_get_from_image(ad->color_popup_data.file_path);
- //-----------------------------------------------------------------------------------------------
- // function call with the index & vconf set
- vconf_set_int(VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, theme_index);
- // LOGIC HERE
-
- Eina_Bool result = ea_theme_input_colors_set(theme_index, EA_THEME_STYLE_DEFAULT);
- if( result == EINA_TRUE ) {
- ea_theme_system_colors_apply();
- }
- }
-
- if(ad->color_popup_data.popup) {
- evas_object_del(ad->color_popup_data.popup);
- ad->color_popup_data.popup = NULL;
- }
-
- /* save wallpaper */
- if(ad->sel_popup_data.launch_from == WALLPAPER_POPUP_FROM_GALLERY){
- util_wallpaper_set(data);
- reply_to_sender(ad,APP_CONTROL_RESULT_SUCCEEDED);
- elm_exit();
- }else{
- done_to_set_wallpaper();
- }
-#if 0
- Eina_Bool result = ea_theme_input_colors_set(ad->color_popup_data.theme_index, EA_THEME_STYLE_DARK);
- if(result == EINA_TRUE)
- {
- ea_theme_system_colors_apply();
- vconf_set_int(VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, ad->color_popup_data.theme_index);
- }
- else
- {
- WALLPAPERUI_ERR("ea_theme_input_colors_set(%d) failed", ad->color_popup_data.theme_index);
- }
-#endif
-}
-
-static Evas_Object *_popup_color_theme_color_applied_image_get(Evas_Object *parent, int *color_theme, const char *bg_file)
-{
- retv_if(bg_file == NULL, NULL);
-
- int theme_index = -1;
-
- theme_index = ea_theme_suitable_theme_get_from_image(bg_file);
- Eina_List *colors = ea_theme_input_colors_get(theme_index);
- int r = 0;
- int g = 0;
- int b = 0;
- if(colors)
- {
- Ea_Theme_Color_hsv *color = eina_list_data_get(colors);
- if(color)
- {
- evas_color_hsv_to_rgb((float)color->h, color->s/100.0, color->v/100.0, &r, &g, &b);
- WALLPAPERUI_DBG("theme index(%d) r(%d) g(%d) b(%d)", theme_index, r, g, b);
- }
- EINA_LIST_FREE(colors, color)
- free(color);
-
- *color_theme = theme_index;
- }
- else
- {
- WALLPAPERUI_ERR("getting bg_set failed");
- return NULL;
- }
-
- Evas *evas = evas_object_evas_get(parent);
- if(evas == NULL)
- {
- WALLPAPERUI_ERR("evas_object_evas_get() failed");
- return NULL;
- }
-
- Evas_Object *rect = evas_object_rectangle_add(evas);
- evas_object_color_set(rect, r, g, b, 255);
- elm_object_part_content_set(parent, "elm.swallow.icon.bg", rect);
- Evas_Object *image = elm_image_add(parent);
- elm_image_file_set(image, ICONDIR"/A01-1_popup_wallpaper_home_ef.png", NULL);
- elm_object_part_content_set(parent, "elm.swallow.icon", image);
-
- return image;
-}
-
-static void _popup_color_theme_popup_response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- wallpaper_ui_service_appdata *ad = data;
- WALLPAPERUI_DBG("_response_cb");
-
- if(ad->color_popup_data.popup) {
- evas_object_del(ad->color_popup_data.popup);
- ad->color_popup_data.popup = NULL;
- }
- WALLPAPERUI_DBG("_response_cb end");
- WALLPAPERUI_DBG("from %d",ad->sel_popup_data.launch_from);
- if(ad->sel_popup_data.launch_from == WALLPAPER_POPUP_FROM_GALLERY)
- {
- reply_to_sender(ad,APP_CONTROL_RESULT_FAILED);
- elm_exit();
- }
-}
-
-Evas_Object *popup_color_theme_util_create_view(void *data)
-{
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view begin");
-
- wallpaper_ui_service_appdata *ad = data;
- retv_if(ad == NULL, NULL);
- retv_if(ad->win == NULL, NULL);
-
- Evas_Object *popup = NULL;
- Evas_Object *btn1 = NULL;
- Evas_Object *btn2 = NULL;
-
- popup = elm_popup_add(ad->win);
- if(popup == NULL)
- {
- WALLPAPERUI_ERR("elm_popup_add() failed");
- goto err;
- }
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_ST_HEADER_COLOUR_THEME"));
-
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- elm_object_translatable_text_set(popup, APP_STRING("IDS_ST_BODY_THE_COLOUR_THEME_WILL_BE_CHANGED_TO"
- "_MATCH_YOUR_SELECTED_WALLPAPER_TO_SET_THE_COLOUR_THEME_MANUALLY_GO_TO_MSG"));
-
- /* setting button */
- btn1 = elm_button_add(popup);
- if(btn1 == NULL)
- {
- WALLPAPERUI_ERR("elm_button_add() failed");
- goto err;
- }
- elm_object_style_set(btn1, "popup");
- elm_object_text_set(btn1, APP_STRING("IDS_LCKSCN_BUTTON_CANCEL"));
- elm_object_part_content_set(popup, "button1", btn1);
- evas_object_smart_callback_add(btn1, "clicked", _popup_color_theme_button1_clicked_cb, data);
-
- /* ok button */
- btn2 = elm_button_add(popup);
- if(btn2 == NULL)
- {
- WALLPAPERUI_ERR("elm_button_add() failed");
- goto err;
- }
- elm_object_style_set(btn2, "popup");
- elm_object_text_set(btn2, APP_STRING("IDS_ST_BUTTON_OK_ABB"));
- elm_object_part_content_set(popup, "button2", btn2);
- evas_object_smart_callback_add(btn2, "clicked", _popup_color_theme_button2_clicked_cb, data);
-
- evas_object_show(popup);
- ad->color_popup_data.popup = popup;
- evas_object_smart_callback_add(popup, "block,clicked", _popup_color_theme_popup_response_cb, ad);
- ea_object_event_callback_add(popup, EA_CALLBACK_BACK, _popup_color_theme_popup_response_cb, ad);
-
- return popup;
-
-err:
-
- if(btn1)
- {
- evas_object_del(btn1);
- }
-
- if(popup)
- {
- evas_object_del(popup);
- }
-
- return NULL;
-}
diff --git a/src/popup-color-theme-main.h b/src/popup-color-theme-main.h
deleted file mode 100755
index 842f798..0000000
--- a/src/popup-color-theme-main.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (c) 2000 - 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.
- *
- */
-
-#ifndef __POPUP_COLOR_THEME_MAIN_H__
-#define __POPUP_COLOR_THEME_MAIN_H__
-
-#include <Elementary.h>
-
-Evas_Object *popup_color_theme_util_create_view(void *data);
-
-#endif /* __POPUP_COLOR_THEME_MAIN_H__ */
diff --git a/src/popup-wallpaper-main.c b/src/popup-wallpaper-main.c
deleted file mode 100755
index 309f870..0000000
--- a/src/popup-wallpaper-main.c
+++ /dev/null
@@ -1,1068 +0,0 @@
-/*
- * starter
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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 <Ecore_X.h>
-//#include <ail.h>
-#include <vconf.h>
-#include <vconf-keys.h>
-#include <efl_assist.h>
-#include <feedback.h>
-#include <ui-gadget.h>
-//#include <notification.h>
-
-
-//#include "lockscreen-options.h"
-#include "wallpaper-ui-service-debug.h"
-#include "popup-wallpaper-main.h"
-
-typedef struct
-{
- Elm_Object_Item *item;
- const char *text;
- const char *path;
- int index;
-} SItem;
-
-static Evas_Object *gengrid = NULL;
-wallpaper_ui_service_appdata *appdata = NULL;
-
-static Eina_Bool flag = EINA_FALSE;
-
-static void _response_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("_response_cb");
- evas_object_del(data);
- WALLPAPERUI_DBG("_response_cb end");
- elm_exit();
-}
-
-static void _service_wallpaper_lockwallpaper_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_DBG("_service_wallpaper_lockwallpaper_ug_result_cb");
- WALLPAPERUI_DBG("_service_wallpaper_lockwallpaper_ug_result_cb end");
-}
-
-static void _service_wallpaper_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_DBG("_service_wallpaper_gallery_ug_result_cb ");
-
- switch(result) {
- case APP_CONTROL_RESULT_SUCCEEDED:
- WALLPAPERUI_DBG("_service_wallpaper_gallery_ug_result_cb APP_CONTROL_RESULT_SUCCEEDED");
- break;
- case APP_CONTROL_RESULT_FAILED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_FAILED");
- break;
- case APP_CONTROL_RESULT_CANCELED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_CANCELED");
- break;
- default:
- WALLPAPERUI_DBG("Unhandled value: %d!", result);
- break;
- }
-}
-static void _service_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_DBG("_service_gallery_ug_result_cb");
-
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
-
- switch(result) {
- case APP_CONTROL_RESULT_SUCCEEDED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_SUCCEEDED");
-
- app_control_h svc_handle = NULL;
-/* app_control_create(&svc_handle);
-
- struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
- if(cbs == NULL){
- app_control_destroy(svc_handle);
- return;
- }
-
- cbs->layout_cb = _launch_gallery_ug_cb;
- cbs->result_cb = _launch_gallery_result_ug_cb;
- cbs->destroy_cb = _launch_gallery_destroy_ug_cb;
- cbs->priv = (void *)data;
-
- char **path_array = NULL;
- int array_length = 0;
- app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &path_array, &array_length);
- if(path_array == NULL) {
- WALLPAPERUI_DBG("path_array is NULL");
- } else {
- app_control_add_extra_data_array(svc_handle, "PATH-ARRAY", path_array, array_length);
- }
-
- ug_create(ug_data->ug, "lockscreen-gallery-efl", UG_MODE_FULLVIEW, svc_handle, cbs);
- app_control_destroy(svc_handle);*/
- if(!app_control_create(&svc_handle)) {
-
- char **path_array = NULL;
- int array_length = 0;
- app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &path_array, &array_length);
- if(path_array == NULL) {
- WALLPAPERUI_DBG("path_array is NULL");
- app_control_destroy(svc_handle);
- break;
- } else {
- app_control_add_extra_data_array(svc_handle, "PATH-ARRAY", path_array, array_length);
- }
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "lockscreen-gallery-efl");
- // Evas_Object *win = (Evas_Object *)ug_get_window();
- // app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- app_control_send_launch_request(svc_handle, NULL, NULL);
- app_control_destroy(svc_handle);
-
- int i = 0;
- for(i=0; i<array_length; i++) {
- if(path_array[i]) {
- free(path_array[i]);
- path_array[i] = NULL;
- }
- }
- }
- break;
- case APP_CONTROL_RESULT_FAILED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_FAILED");
- break;
- case APP_CONTROL_RESULT_CANCELED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_CANCELED");
- break;
- default:
- WALLPAPERUI_DBG("Unhandled value: %d!", result);
- break;
- }
-
- WALLPAPERUI_DBG("_service_lockscreen_gallery_ug_result_cb end\n");
-}
-
-static void launch_wallpaper(void* data,int bSolid)
-{
- WALLPAPERUI_DBG("launch_wallpaper");
- app_control_h svc_handle = NULL;
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "wallpaper-viewer-efl");
-
- //app_control_add_extra_data(svc_handle, "launch-type", "select-setas");
- if(bSolid==1)
- {
- app_control_add_extra_data(svc_handle, "Folder", "/opt/usr/share/settings/Wallpapers/solid");
- }
- else
- app_control_add_extra_data(svc_handle, "Folder", "/opt/usr/share/settings/Wallpapers");
-
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
- app_control_add_extra_data(svc_handle, "Setas type", "Lockscreen");
- }
- else if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- app_control_add_extra_data(svc_handle, "Setas type", "Wallpaper");
- }
- else
- {
- app_control_add_extra_data(svc_handle, "Setas type", "Wallpaper & Lockscreen");
- }
-
- int ret = app_control_send_launch_request(svc_handle, _service_wallpaper_lockwallpaper_ug_result_cb, data);
- if(ret == APP_CONTROL_ERROR_NONE) {
- WALLPAPERUI_DBG("APP_CONTROL_ERROR_NONE");
- }
- app_control_destroy(svc_handle);
- }
-
-}
-
-static void _icon1_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_DBG("_icon1_clicked_cb");
- app_control_h svc_mt_ug = NULL;
- if(data != NULL) {
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
-// if(ad->sel_popup_data.act_pop != NULL) {
- //elm_popup_timeout_set(ad->sel_popup_data.act_pop, 1.5);
- //evas_object_hide(ad->sel_popup_data.act_pop);
-// }
-// evas_object_del(ad->sel_popup_data.act_pop);
-
- launch_wallpaper(data,0);
-
- }
- WALLPAPERUI_DBG("_icon1_clicked_cb end");
-
-}
-
-static void _icon2_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_DBG("_icon2_clicked_cb");
- if(data != NULL) {
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
-// if(ad->sel_popup_data.act_pop != NULL) {
- //elm_popup_timeout_set(ad->sel_popup_data.act_pop, 1.5);
- //evas_object_hide(ad->sel_popup_data.act_pop);
-// }
-// evas_object_del(ad->sel_popup_data.act_pop);
-
- //__block_screen_icon_clicked(data);
-
- #if 1
- app_control_h svc_handle = NULL;
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "gallery-efl");
-
- app_control_add_extra_data(svc_handle, "launch-type", "select-setas");
- //app_control_add_extra_data(svc_handle, "launch-type", "select-multiple");
- //app_control_add_extra_data(svc_handle, "file-type","image");
- //app_control_add_extra_data(svc_handle, "max-count", "10");
- //app_control_add_extra_data(svc_handle, "Folder", "/opt/usr/share/settings/Wallpapers");
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- app_control_add_extra_data(svc_handle, "setas-type", "wallpaper");
- else if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- app_control_add_extra_data(svc_handle, "setas-type", "lockscreen");
- else
- app_control_add_extra_data(svc_handle, "setas-type", "wallpaper and lockscreen");
-
- app_control_add_extra_data(svc_handle, "hide-personal", "true");
-
-// Evas_Object *win = (Evas_Object *)ug_get_window();
-// app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- app_control_send_launch_request(svc_handle, _service_wallpaper_gallery_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
- #else
- launch_wallpaper_gallery_ug(data);
- #endif
-
- }
-}
-
-static void _cp_lockwallpaper_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_DBG("_cp_lockwallpaper_ug_result_cb");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
- if(ad != NULL) {
- if(ad->sel_popup_data.act_pop != NULL) {
- evas_object_del(ad->sel_popup_data.act_pop);
- ad->sel_popup_data.act_pop = NULL;
- }
- }
-
- switch(result) {
- case APP_CONTROL_RESULT_SUCCEEDED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_SUCCEEDED");
- break;
- case APP_CONTROL_RESULT_FAILED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_FAILED");
- break;
- case APP_CONTROL_RESULT_CANCELED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_CANCELED");
- break;
- default:
- WALLPAPERUI_DBG("Unhandled value: %d!", result);
- break;
- }
- WALLPAPERUI_DBG("_cp_lockwallpaper_ug_result_cb end");
-}
-
-static void _wallpaper_solidcolor_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_DBG("_wallpaper_solidcolor_ug_result_cb");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
- if(ad != NULL) {
- if(ad->sel_popup_data.act_pop != NULL) {
- evas_object_del(ad->sel_popup_data.act_pop);
- ad->sel_popup_data.act_pop = NULL;
- }
- }
-
- switch(result) {
- case APP_CONTROL_RESULT_SUCCEEDED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_SUCCEEDED");
- break;
- case APP_CONTROL_RESULT_FAILED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_FAILED");
- break;
- case APP_CONTROL_RESULT_CANCELED:
- WALLPAPERUI_DBG("APP_CONTROL_RESULT_CANCELED");
- break;
- default:
- WALLPAPERUI_DBG("Unhandled value: %d!", result);
- break;
- }
- WALLPAPERUI_DBG("_wallpaper_solidcolor_ug_result_cb end");
-}
-
-static void _icon3_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_DBG("_icon3_clicked_cb");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
- app_control_h svc_handle = NULL;
-#if 1
- if(ad->sel_popup_data.setas_type==WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- //launch_wallpaper(data,1);
- }
- else
- {
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "cp-wallpaper-efl");
- // Evas_Object *win = (Evas_Object *)ug_get_window();
- // app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- app_control_send_launch_request(svc_handle, _cp_lockwallpaper_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
- }
-
-#else
- app_control_h svc_handle = NULL;
- app_control_create(&svc_handle);
- struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
- if(cbs == NULL){
- app_control_destroy(svc_handle);
- return;
- }
- cbs->layout_cb = _launch_cp_wallpaper_layout_ug_cb;
- cbs->result_cb = _launch_cp_wallpaper_result_ug_cb;
- cbs->destroy_cb = _launch_cp_wallpaper_destroy_ug_cb;
- cbs->priv = (void *)data;
- ug_create(ad->ug, "cp-wallpaper-efl", UG_MODE_FULLVIEW, svc_handle, cbs);
- app_control_destroy(svc_handle);
-#endif
-}
-
-static void _icon4_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_DBG("-----------_icon4_clicked_cb");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
-
- char path[30][2000] = {0};
- int count = wallpaper_txt_list_read("/opt/usr/share/lockscreen/wallpaper_list/lockscreen_selected_images.txt", path);
- WALLPAPERUI_DBG("count = %d",count);
-/* if(count == 0)
- {
- WALLPAPERUI_DBG("there is only one file");
-
- app_control_h svc_handle = NULL;
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "gallery-efl");
- app_control_add_extra_data(svc_handle, "launch-type", "select-multiple");
- app_control_add_extra_data(svc_handle, "file-type","image");
- app_control_add_extra_data(svc_handle, "max-count", "20");
- app_control_add_extra_data(svc_handle, "setas-type", "lockscreen");
- app_control_add_extra_data(svc_handle, "hide-personal", "true");
-
- //Evas_Object *win = (Evas_Object *)ug_get_window();
- //app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- app_control_send_launch_request(svc_handle, _service_gallery_ug_result_cb, ad);
- app_control_destroy(svc_handle);
- }
- return;
- }*/
-
- app_control_h svc_handle = NULL;
- #if 0
- app_control_create(&svc_handle);
-
- struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
- if(cbs == NULL){
- app_control_destroy(svc_handle);
- return;
- }
-
- cbs->layout_cb = _launch_wallpaper_options_layout_ug_cb;
- cbs->result_cb = _launch_wallpaper_options_result_ug_cb;
- cbs->destroy_cb = _launch_wallpaper_options_destroy_ug_cb;
- cbs->priv = (void *)data;
- ug_create(ad->ug, "lockscreen-gallery-efl", UG_MODE_FULLVIEW, svc_handle, cbs);
- app_control_destroy(svc_handle);
- #endif
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "lockscreen-gallery-efl");
-// Evas_Object *win = (Evas_Object *)ug_get_window();
-// app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- app_control_send_launch_request(svc_handle, NULL, NULL);
- app_control_destroy(svc_handle);
- }
-}
-
-
-
-static void _mouse_down_cb(void *data, Evas * evas, Evas_Object * obj,
- void *event_info)
-{
- WALLPAPERUI_DBG("_mouse_down_cb");
-
- if(obj != NULL) {
- evas_object_color_set(obj, 100, 100, 100, 100);
- }
-}
-
-static void _key_press_cb(void *data,Evas_Object * obj,
- void *event_info)
-{
- WALLPAPERUI_DBG("_key_press_cb");
-
- if(obj != NULL) {
- evas_object_color_set(obj, 100, 100, 100, 100);
- }
-}
-
-static void _key_up_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("_key_up_cb");
-
- if(obj != NULL) {
- evas_object_color_set(obj, 255, 255, 255, 255);
- }
-}
-
-static void _mouse_up_cb(void *data, Evas * evas, Evas_Object * obj,
- void *event_info)
-{
- WALLPAPERUI_DBG("_mouse_up_cb");
-
- if(obj != NULL) {
- evas_object_color_set(obj, 255, 255, 255, 255);
- }
-}
-
-static void _popup_resp_cb(void *data, Evas_Object *obj,
- void *event_info)
-{
- WALLPAPERUI_DBG("_popup_resp_cb");
- if(data) {
- evas_object_del(data);
- data = NULL;
- }
- elm_exit();
- WALLPAPERUI_DBG("_popup_resp_cb end");
-}
-
-void lockscreen_options_lockwallpaper_popup_destroy(void *data)
-{
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
- if(ad == NULL)
- return;
-
- if(ad->sel_popup_data.act_pop) {
- evas_object_del(ad->sel_popup_data.act_pop);
- ad->sel_popup_data.act_pop = NULL;
- }
-
-}
-
-static void _lockwallpaper_popup_resp_cb(void *data, Evas_Object *obj,
- void *event_info)
-{
-
- WALLPAPERUI_DBG("_lockwallpaper_popup_resp_cb");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- if (ad->sel_popup_data.act_pop)
- {
- evas_object_del(ad->sel_popup_data.act_pop);
- ad->sel_popup_data.act_pop = NULL;
- }
- elm_exit();
- WALLPAPERUI_DBG("_lockwallpaper_popup_resp_cb end");
-}
-static Eina_Bool _pop_cb(void *data, Elm_Object_Item *it)
-{
- WALLPAPERUI_DBG("_pop_cb begin");
-
- /*do something before destroy*/
- wallpaper_ui_service_appdata *ad=
- (wallpaper_ui_service_appdata *) data;
-
- if (ad == NULL)
- return EINA_FALSE;
- if (ad->sel_popup_data.act_pop)
- {
- evas_object_del(ad->sel_popup_data.act_pop);
- ad->sel_popup_data.act_pop = NULL;
- }
- elm_exit();
- return EINA_FALSE;
-}
-static void __btn1_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
- WALLPAPERUI_DBG("__btn1_clicked_cb");
- if(obj != NULL && obj != gengrid) {
- evas_object_color_set(obj, 255, 255, 255, 255);
- }
- if(data != NULL) {
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
- launch_wallpaper(data,0);
- }
- WALLPAPERUI_DBG("__btn1_clicked_cb end");
- if(obj != gengrid)
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
-}
-static void __btn2_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
- WALLPAPERUI_DBG("__btn2_clicked_cb");
- if(obj != NULL && obj != gengrid) {
- evas_object_color_set(obj, 255, 255, 255, 255);
- }
- if(data != NULL) {
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
-
- app_control_h svc_handle = NULL;
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "gallery-efl");
-
- app_control_add_extra_data(svc_handle, "launch-type", "select-setas");
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- app_control_add_extra_data(svc_handle, "setas-type", "wallpaper");
- else if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- app_control_add_extra_data(svc_handle, "setas-type", "lockscreen");
- else
- app_control_add_extra_data(svc_handle, "setas-type", "wallpaper and lockscreen");
-
- app_control_add_extra_data(svc_handle, "hide-personal", "true");
-
- app_control_send_launch_request(svc_handle, _service_wallpaper_gallery_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
-
- }
- if(obj != gengrid)
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- WALLPAPERUI_DBG("__btn2_clicked_cb end");
-
-}
-static void __btn3_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
- WALLPAPERUI_DBG("__btn3_clicked_cb");
- if(obj != NULL && obj != gengrid) {
- evas_object_color_set(obj, 255, 255, 255, 255);
- }
- app_control_h svc_handle = NULL;
- wallpaper_ui_service_appdata *ad =
- (wallpaper_ui_service_appdata *) data;
- if(ad->sel_popup_data.setas_type==WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- //launch_wallpaper(data,1);
- if(!app_control_create(&svc_handle)) {
- WALLPAPERUI_DBG("!!!!!!!!!!!!!!!!");
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "wallpaper-solidcolor-efl");
- app_control_send_launch_request(svc_handle, _wallpaper_solidcolor_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
- }
- else
- {
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "cp-wallpaper-efl");
- app_control_send_launch_request(svc_handle, _cp_lockwallpaper_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
- }
- if(obj != gengrid)
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- WALLPAPERUI_DBG("__btn3_clicked_cb end");
-
-}
-static void __btn4_clicked_cb(void *data, Evas_Object * obj, void *event_info)
-{
- WALLPAPERUI_DBG("__btn1_clicked_cb");
- if(obj != NULL && obj != gengrid) {
- evas_object_color_set(obj, 255, 255, 255, 255);
- }
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *) data;
-
- char path[30][2000] = {0};
- int count = wallpaper_txt_list_read("/opt/usr/share/lockscreen/wallpaper_list/lockscreen_selected_images.txt", path);
- WALLPAPERUI_DBG("count = %d",count);
-
- app_control_h svc_handle = NULL;
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- app_control_set_app_id(svc_handle, "lockscreen-gallery-efl");
- app_control_send_launch_request(svc_handle, NULL, NULL);
- app_control_destroy(svc_handle);
- }
- if(obj != gengrid)
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
- WALLPAPERUI_DBG("__btn1_clicked_cb end");
-}
-
-static char * grid_text_get(void *data, Evas_Object *obj, const char *part)
-{
- WALLPAPERUI_DBG("grid_text_get");
- SItem *ti = (SItem *)data;
-
- if (!strcmp(part, "elm.text"))
- return strdup(ti->text);
-
- return NULL;
-}
-
-static Evas_Object * grid_content_get(void *data, Evas_Object *obj, const char *part)
-{
- WALLPAPERUI_DBG("grid_content_get");
- SItem *ti = (SItem *)data;
-
- if(!strcmp(part, "elm.swallow.icon")) {
- Evas_Object *icon = elm_image_add(obj);
- elm_image_file_set(icon, ti->path, NULL);
- elm_image_aspect_fixed_set(icon, EINA_FALSE);
- elm_image_preload_disabled_set(icon, EINA_FALSE);
- evas_object_show(icon);
- return icon;
- }
-
- return NULL;
-}
-
-static void _item_selected(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("_item_selected");
-
- if(!flag)
- return;
-
- flag = EINA_FALSE;
-
- SItem *ti = (SItem *)data;
-
- SItem *item = NULL;
- Elm_Object_Item *object_item = elm_gengrid_first_item_get(gengrid);
- while(object_item) {
- item = elm_object_item_data_get(object_item);
- if(item && item->index != ti->index) {
- WALLPAPERUI_DBG("item->index = %d", item->index);
- elm_gengrid_item_select_mode_set(item->item, ELM_OBJECT_SELECT_MODE_NONE);
- } else if (item) {
- WALLPAPERUI_DBG("item->index = %d", item->index);
- elm_gengrid_item_select_mode_set(item->item, ELM_OBJECT_SELECT_MODE_DEFAULT);
- }
-
- object_item = elm_gengrid_item_next_get(object_item);
- }
-
- switch (ti->index) {
- case 0:
- __btn1_clicked_cb(appdata, obj, event_info);
- break;
- case 1:
- __btn2_clicked_cb(appdata, obj, event_info);
- break;
- case 2:
- case 4:
- __btn3_clicked_cb(appdata, obj, event_info);
- break;
- case 3:
- __btn4_clicked_cb(appdata, obj, event_info);
- break;
- default:
- break;
-
- }
-}
-
-static Evas_Object *_create_gengrid(void *data, Evas_Object *popup)
-{
- WALLPAPERUI_DBG("_create_gengrid");
-
- flag = EINA_TRUE;
-
- Evas_Object *parent = (Evas_Object *)data;
- Evas_Object *gengrid;
- Elm_Gengrid_Item_Class *gic;
- int i, j, n, w, h;
- char buf[PATH_MAX];
- static SItem ti[5];
-
- gengrid = elm_gengrid_add(parent);
- elm_object_style_set(gengrid, "popup");
- evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_gengrid_align_set(gengrid, 0.5, 0.5);
-
- elm_gengrid_multi_select_set(gengrid, EINA_FALSE);
-
- double scale = elm_config_scale_get();
- w = (int)((190 + (4 * 2)) * scale); // Gengrid item width (image area width + left/right padding) from Winset UX Guide
- h = (int)((150 + (37 * 2)) * scale); // Gengrid item height (image area height + top/bottom padding) from Winset UX Guide
-
- elm_gengrid_item_size_set(gengrid, w, h);
- gic = elm_gengrid_item_class_new();
- retv_if(gic == NULL, NULL);
-
- gic->item_style = "default";
- gic->func.text_get = grid_text_get;
- gic->func.content_get = grid_content_get;
- gic->func.state_get = NULL;
- gic->func.del = NULL;
-
- //default wallpapers
- ti[0].path = strdup(ICONDIR"/ug-wallpaper-viewer-efl.png");
- ti[0].text = strdup(APP_STRING("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
- ti[0].index = 0;
- //ti[0].item = elm_gengrid_item_append(gengrid, gic, &(ti[0]), _item_selected, &(ti[0]));
-
- //gallery
- ti[1].path = strdup(ICONDIR"/org.tizen.gallery.png");
- ti[1].text = strdup(APP_STRING("IDS_LCKSCN_BODY_GALLERY"));
- ti[1].index = 1;
- //ti[1].item = elm_gengrid_item_append(gengrid, gic, &(ti[1]), _item_selected, &(ti[1]));
-
- //my interests
- ti[2].path = strdup(ICONDIR"/travel.png");
- ti[2].text = strdup(_("IDS_LCKSCN_BUTTON2_MY_INTERESTSM_PREFERRED_CATEGORIES_ABB"));
- ti[2].index = 2;
- //ti[2].item = elm_gengrid_item_append(gengrid, gic, &(ti[2]), _item_selected, &(ti[2]));
-
- //slidesshow
- ti[3].path = strdup(ICONDIR"/photo_slide.png");
- ti[3].text = strdup(_("IDS_LCKSCN_BUTTON2_SLIDESHOW"));
- ti[3].index = 3;
- //ti[3].item = elm_gengrid_item_append(gengrid, gic, &(ti[3]), _item_selected, &(ti[3]));
-
- //colorpalette
- ti[4].path = strdup(ICONDIR"/settings_color_theme.png");
- ti[4].text = strdup(_("IDS_HS_HEADER_COLOUR_PALETTE_ABB2"));
- ti[4].index = 4;
- #if 0
- if(appdata->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN) {
- WALLPAPERUI_DBG("WALLPAPER_POPUP_SETAS_LOCKSCREEN: 3 icons");
- ti[0].item = elm_gengrid_item_append(gengrid, gic, &(ti[0]), _item_selected, &(ti[0]));
- ti[1].item = elm_gengrid_item_append(gengrid, gic, &(ti[1]), _item_selected, &(ti[1]));
- ti[4].item = elm_gengrid_item_append(gengrid, gic, &(ti[4]), _item_selected, &(ti[4]));
- } else if(appdata->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN) {
- WALLPAPERUI_DBG("WALLPAPER_POPUP_SETAS_HOMESCREEN: 4 icons");
- ti[0].item = elm_gengrid_item_append(gengrid, gic, &(ti[0]), _item_selected, &(ti[0]));
- ti[1].item = elm_gengrid_item_append(gengrid, gic, &(ti[1]), _item_selected, &(ti[1]));
- ti[2].item = elm_gengrid_item_append(gengrid, gic, &(ti[2]), _item_selected, &(ti[2]));
- ti[3].item = elm_gengrid_item_append(gengrid, gic, &(ti[3]), _item_selected, &(ti[3]));
- } else {
- WALLPAPERUI_DBG("2 icons");
- ti[0].item = elm_gengrid_item_append(gengrid, gic, &(ti[0]), _item_selected, &(ti[0]));
- ti[1].item = elm_gengrid_item_append(gengrid, gic, &(ti[1]), _item_selected, &(ti[1]));
- }
- #endif
- ti[0].item = elm_gengrid_item_append(gengrid, gic, &(ti[0]), _item_selected, &(ti[0]));
- ti[1].item = elm_gengrid_item_append(gengrid, gic, &(ti[1]), _item_selected, &(ti[1]));
-
- elm_gengrid_item_class_free(gic);
-
- elm_scroller_policy_set(gengrid, ELM_SCROLLER_POLICY_OFF,ELM_SCROLLER_POLICY_OFF);
- evas_object_show(gengrid);
-
- return gengrid;
-}
-
-static void _on_rotation_gengrid_change(void *data, Evas_Object *obj, void *event_info )
-{
- WALLPAPERUI_DBG("_on_rotation_gengrid_change");
- int rot = -1;
- Evas_Object *win = obj;
- Evas_Object *layout = data;
-
- rot = elm_win_rotation_get(win);
- if (rot == 90 || rot == 270) {
- WALLPAPERUI_DBG("90");
- #if 0
- if(appdata->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_rotate_2line");
- else
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_rotate_1line");
- #endif
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_rotate_1line");
- }
- else
- #if 0
- if(appdata->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_2line");
- else
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_1line");
- #endif
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_1line");
-}
-
-void popup_wallpaper_main_create_view(void * data)
-{
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view begin");
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- appdata = (wallpaper_ui_service_appdata *)data;
- Evas_Object *popup;
- Evas_Object *layout;
- Evas_Object *btn1;
- Evas_Object *icon1;
- Evas_Object *icon2;
- Evas_Object *icon3;
- Evas_Object *icon4;
-
-// Evas_Object *navi_bar = ad->navi_bar;
-
-/* Elm_Object_Item *navi_item = elm_naviframe_item_push(navi_bar, NULL, NULL, NULL, NULL, NULL);
- elm_object_item_domain_text_translatable_set(navi_item, PKGNAME, EINA_TRUE);
- elm_naviframe_item_pop_cb_set(navi_item, _pop_cb, ad);*/
-
- popup = elm_popup_add(ad->sel_popup_data.win_main);
- ad->sel_popup_data.act_pop = popup;
- ea_object_event_callback_add(ad->sel_popup_data.act_pop, 0, _lockwallpaper_popup_resp_cb, data);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- elm_object_part_text_set(popup, "title,text", APP_STRING("IDS_COM_HEADER_SELECT_WALLPAPER"));
- //ea_object_event_callback_add(popup, EA_CALLBACK_BACK, ea_popup_back_cb, NULL);
- evas_object_smart_callback_add(popup, "block,clicked", _response_cb, popup);
- ea_object_event_callback_add(popup, 0, _popup_resp_cb, popup);
-
- layout = elm_layout_add(popup);
-
- int rot = elm_win_rotation_get((Evas_Object *)ug_get_window());
- if (rot == 90 || rot == 270) {
- WALLPAPERUI_DBG("90");
- #if 0
- if(appdata->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_rotate_2line");
- else
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_rotate_1line");
- #endif
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_rotate_1line");
- }
- else {
- #if 0
- if(appdata->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_2line");
- else
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_1line");
- #endif
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_gengrid_custom_1line");
- }
- gengrid = _create_gengrid(layout, popup);
- elm_gengrid_item_show(elm_gengrid_first_item_get(gengrid), ELM_GENGRID_ITEM_SCROLLTO_TOP);
- elm_object_part_content_set(layout, "elm.swallow.content" , gengrid);
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-#if 0
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view launch_way is 3 icons");
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_checkview_image_4icons");
- }
- else if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view launch_way is 3 icons");
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_checkview_image_3icons");
- }
- else
- {
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view launch_way is 2 icons");
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "popup_checkview_image_2icons");
- }
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view ");
-
-// evas_object_focus_set(popup,EINA_TRUE);
-
-if(ad->sel_popup_data.setas_type != WALLPAPER_POPUP_SETAS_LOCKSCREEN) {
- Evas_Object *btn = elm_button_add(layout);
- elm_object_style_set(btn, "focus");
-
- icon1 = elm_image_add(layout);
- elm_image_file_set(icon1, ICONDIR"/ug-wallpaper-viewer-efl.png", NULL);
- elm_object_part_content_set(btn, "elm.swallow.content", icon1);
- elm_object_part_content_set(layout, "elm.swallow.icon1", btn);
-// elm_object_focus_allow_set(icon1,EINA_TRUE);
-
-// Evas_Object *ao = elm_access_object_register(icon1, layout);
-// elm_access_info_set(ao, ELM_ACCESS_INFO, _("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
-// elm_access_activate_cb_set(ao, (Elm_Access_Activate_Cb)_icon1_clicked_cb, data);
-// elm_object_focus_custom_chain_append(layout, ao, NULL);
-
- elm_object_part_text_set(layout, "txt1", _("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
- evas_object_show(icon1);
-// evas_object_event_callback_add(icon1, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, data);
-// evas_object_event_callback_add(icon1, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, data);
-
- Evas_Object *btn2 = elm_button_add(layout);
- elm_object_style_set(btn2, "focus");
-
- icon2 = elm_image_add(layout);
- elm_image_file_set(icon2, ICONDIR"/org.tizen.gallery.png", NULL);
- elm_object_part_content_set(btn2, "elm.swallow.content", icon2);
- elm_object_part_content_set(layout, "elm.swallow.icon2", btn2);
-
-// Evas_Object *ao2 = elm_access_object_register(icon2, layout);
-// elm_access_activate_cb_set(ao2, (Elm_Access_Activate_Cb)_icon2_clicked_cb, data);
-// elm_object_focus_custom_chain_append(layout, ao2, NULL);
-
- elm_object_part_text_set(layout, "txt2", _("IDS_LCKSCN_BODY_GALLERY"));
- evas_object_show(icon2);
-// evas_object_event_callback_add(icon2, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, data);
-// evas_object_event_callback_add(icon2, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, data);
-
-// elm_object_signal_callback_add(layout, "elm.swallow.icon1,clicked", "*", _icon1_clicked_cb, data);
-// elm_object_signal_callback_add(layout, "elm.swallow.icon2,clicked", "*", _icon2_clicked_cb, data);
- evas_object_smart_callback_add(btn, "clicked", __btn1_clicked_cb, data);
- evas_object_smart_callback_add(btn, "pressed", _key_press_cb, data);
- evas_object_smart_callback_add(btn, "unpressed", _key_up_cb, data);
- elm_access_info_set(btn, ELM_ACCESS_INFO, _("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
-
- evas_object_smart_callback_add(btn2, "clicked", __btn2_clicked_cb, data);
- evas_object_smart_callback_add(btn2, "pressed", _key_press_cb, data);
- evas_object_smart_callback_add(btn2, "unpressed", _key_up_cb, data);
- elm_access_info_set(btn2, ELM_ACCESS_INFO, _("IDS_LCKSCN_BODY_GALLERY"));
-// evas_object_smart_callback_add(btn, "clicked", __btn2_clicked_cb, data);
-}
-
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view !strcmplaunch_way ");
-
- Evas_Object *btn3 = elm_button_add(layout);
- elm_object_style_set(btn3, "focus");
- icon3 = elm_image_add(layout);
- elm_image_file_set(icon3, ICONDIR"/settings_color_theme.png", NULL);
- elm_object_part_content_set(btn3, "elm.swallow.content", icon3);
- elm_object_part_content_set(layout, "elm.swallow.icon3", btn3);
- elm_object_part_text_set(layout, "txt3", _("IDS_HS_HEADER_COLOUR_PALETTE_ABB2"));
- evas_object_show(icon3);
- evas_object_smart_callback_add(btn3, "clicked", __btn3_clicked_cb, data);
- evas_object_smart_callback_add(btn3, "pressed", _key_press_cb, data);
- evas_object_smart_callback_add(btn3, "unpressed", _key_up_cb, data);
- elm_access_info_set(btn3, ELM_ACCESS_INFO, _("IDS_HS_HEADER_COLOUR_PALETTE_ABB2"));
- #if 0
- icon3 = elm_image_add(layout);
- elm_image_file_set(icon3, ICONDIR"/settings_color_theme.png", NULL);
- elm_object_part_content_set(layout, "elm.swallow.icon3", icon3);
-
- Evas_Object *ao3 = elm_access_object_register(icon3, layout);
- elm_access_info_set(ao3, ELM_ACCESS_INFO, _("Solid color"));
- elm_access_activate_cb_set(ao3, (Elm_Access_Activate_Cb)_icon3_clicked_cb, data);
- elm_object_focus_custom_chain_append(layout, ao3, NULL);
-
- elm_object_part_text_set(layout, "txt3", _("Solid color"));
- evas_object_show(icon3);
- evas_object_event_callback_add(icon3, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, data);
- evas_object_event_callback_add(icon3, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, data);
- elm_object_signal_callback_add(layout, "elm.swallow.icon3,clicked", "*", _icon3_clicked_cb, data);
- #endif
- }
-
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view WALLPAPER_POPUP_SETAS_LOCKSCREEN ");
-
- Evas_Object *btn3 = elm_button_add(layout);
- elm_object_style_set(btn3, "focus");
-
- icon3 = elm_image_add(layout);
- elm_image_file_set(icon3, ICONDIR"/travel.png", NULL);
- elm_object_part_content_set(btn3, "elm.swallow.content", icon3);
- elm_object_part_content_set(layout, "elm.swallow.icon3", btn3);
-
-// Evas_Object *ao3 = elm_access_object_register(icon3, layout);
-// elm_access_info_set(ao3, ELM_ACCESS_INFO, _("IDS_STRAVEL_OPT_TRAVEL_WALLPAPER_ABB"));
-// elm_access_activate_cb_set(ao3, (Elm_Access_Activate_Cb)_icon3_clicked_cb, data);
-// elm_object_focus_custom_chain_append(layout, ao3, NULL);
-
- elm_object_part_text_set(layout, "txt3", _("IDS_LCKSCN_BUTTON2_MY_INTERESTSM_PREFERRED_CATEGORIES_ABB"));
- evas_object_show(icon3);
-// evas_object_event_callback_add(icon3, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, data);
-// evas_object_event_callback_add(icon3, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, data);
-// elm_object_signal_callback_add(layout, "elm.swallow.icon3,clicked", "*", _icon3_clicked_cb, data);
-
- Evas_Object *btn4 = elm_button_add(layout);
- elm_object_style_set(btn4, "focus");
-
- icon4 = elm_image_add(layout);
- elm_image_file_set(icon4, ICONDIR"/photo_slide.png", NULL);
- elm_object_part_content_set(btn4, "elm.swallow.content", icon4);
- elm_object_part_content_set(layout, "elm.swallow.icon4", btn4);
-// Evas_Object *ao4 = elm_access_object_register(icon4, layout);
-// elm_access_info_set(ao4, ELM_ACCESS_INFO, _("IDS_LCKSCN_BUTTON2_SLIDESHOW"));
-// elm_access_activate_cb_set(ao4, (Elm_Access_Activate_Cb)_icon4_clicked_cb, data);
-// elm_object_focus_custom_chain_append(layout, ao4, NULL);
- elm_object_part_text_set(layout, "txt4", _("IDS_LCKSCN_BUTTON2_SLIDESHOW"));
- evas_object_show(icon4);
-// evas_object_event_callback_add(icon4, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, data);
-// evas_object_event_callback_add(icon4, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, data);
-// elm_object_signal_callback_add(layout, "elm.swallow.icon4,clicked", "*", _icon4_clicked_cb, data);
-
- evas_object_smart_callback_add(btn3, "clicked", __btn3_clicked_cb, data);
- evas_object_smart_callback_add(btn3, "pressed", _key_press_cb, data);
- evas_object_smart_callback_add(btn3, "unpressed", _key_up_cb, data);
- elm_access_info_set(btn3, ELM_ACCESS_INFO, _("IDS_LCKSCN_BUTTON2_MY_INTERESTSM_PREFERRED_CATEGORIES_ABB"));
-
- evas_object_smart_callback_add(btn4, "clicked", __btn4_clicked_cb, data);
- evas_object_smart_callback_add(btn4, "pressed", _key_press_cb, data);
- evas_object_smart_callback_add(btn4, "unpressed", _key_up_cb, data);
- elm_access_info_set(btn4, ELM_ACCESS_INFO, _("IDS_LCKSCN_BUTTON2_SLIDESHOW"));
- elm_object_focus_next_object_set(btn3,btn4,ELM_FOCUS_DOWN);
- elm_object_focus_next_object_set(btn4,btn3,ELM_FOCUS_UP);
-
- }
-#endif
- evas_object_show(layout);
- elm_object_content_set(popup, layout);
- evas_object_smart_callback_add(elm_object_top_widget_get(popup), "rotation,changed", _on_rotation_gengrid_change, layout);
- evas_object_show(popup);
-
- WALLPAPERUI_DBG("popup_wallpaper_main_create_view end");
-}
-
-Evas_Object *popup_wallpaper_util_create_layout(Evas_Object * parent, const char *file, const char *group)
-{
- Evas_Object *layout = NULL;
-
- if (parent == NULL) {
- WALLPAPERUI_DBG("Parent is null.");
- return NULL;
- }
-
- layout = elm_layout_add(parent);
- if (layout == NULL) {
- WALLPAPERUI_DBG("Cannot add layout.");
- return NULL;
- }
-
- if ((file != NULL) && (group != NULL)) {
- elm_layout_file_set(layout, file, group);
- }
-
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- evas_object_show(layout);
-
- return layout;
-}
diff --git a/src/popup-wallpaper-main.h b/src/popup-wallpaper-main.h
deleted file mode 100755
index 1cce219..0000000
--- a/src/popup-wallpaper-main.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * popup-wallpaper-efl
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
- *
- * 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.
- *
- */
-
-#ifndef __POPUP_WALLPAPER_MAIN_H__
-#define __POPUP_WALLPAPER_MAIN_H__
-
-#include <Elementary.h>
-#include "wallpaper-ui-service.h"
-
-void popup_wallpaper_main_create_view(void * data);
-Evas_Object *popup_wallpaper_util_create_layout(Evas_Object * parent, const char *file, const char *group);
-
-
-#endif /* __POPUP_WALLPAPER_MAIN_H__ */
diff --git a/src/wallpaper-ui-service-main.c b/src/wallpaper-ui-service-main.c
index 2297fab..56ad539 100755
--- a/src/wallpaper-ui-service-main.c
+++ b/src/wallpaper-ui-service-main.c
@@ -1,9 +1,5 @@
/*
- * setting
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd.
- *
- * Contact: Sung park <sung1103.park@samsung.com>
+ * Copyright (c) 20014-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.
@@ -16,108 +12,51 @@
* 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 <app.h>
-//#include <ui-gadget.h>
#include <Elementary.h>
#include <Evas.h>
#include <Ecore_X.h>
-
-//#include <appcore-efl.h>
-//#include <appcore-common.h>
#include <vconf.h>
-#include <efl_assist.h>
+#include <efl_extension.h>
#include <system_settings.h>
-#include <notification.h>
-#include <app_alarm.h>
#include <media_content.h>
#include <feedback.h>
+#include <app_control_internal.h>
#include "wallpaper-ui-service.h"
#include "wallpaper-ui-service-main.h"
-#if !DISABLE_CP_WALLPAPER
-#include "cp-wallpaper-main.h"
-#endif
-
-#define WALLPAPER_TXT_FILE "/opt/usr/share/lockscreen/wallpaper_list/lockscreen_selected_images.txt"
-#define MAX_MULTIPLE_SELECTION 6
-#define COLOR_PALLETE_IMAGE_NEW "/opt/usr/share/lockscreen/wallpaper_list/color_pallete_image_new.jpg"
-#define COLOR_PALLETE_IMAGE "/opt/usr/share/lockscreen/wallpaper_list/color_pallete_image.jpg"
-
-static int current_index = 0;
-
-//static Evas_Object *layout = NULL;
-static Evas_Object *preview_image = NULL;
-static Evas_Object *gengrid = NULL;
-static Elm_Gengrid_Item_Class *gic = NULL;
-
-static Eina_Bool flag_main = EINA_FALSE;
-static Eina_Bool flag_home = EINA_TRUE;
-
-Eina_Bool flag_home_changed = EINA_FALSE;
-Eina_Bool flag_lock_changed = EINA_FALSE;
-Eina_Bool flag_color_pallete = EINA_FALSE;
-Eina_Bool flag_pre_color_pallete = EINA_FALSE;
-
-static Eina_Bool longpress= EINA_FALSE;
-
-static Evas_Object *bg_home_icon = NULL;
-Evas_Object *bg_lock_icon = NULL;
-
-static Eina_Bool flag_edit_click = EINA_FALSE;
-
-#define HOME_DEFAULT_PATH "/opt/usr/share/lockscreen/wallpaper_list/Home_default.png"
-#define LOCK_DEFAULT_PATH "/opt/usr/share/lockscreen/wallpaper_list/Lock_default.png"
-#define HOME_SETTING_DEFAULT_PATH "/opt/usr/share/settings/Wallpapers/Home_default.png"
-#define LOCK_SETTING_DEFAULT_PATH "/opt/usr/share/settings/Wallpapers/Lock_default.png"
-#define LOCK_SERVICE_DEFAULT_PATH "/opt/usr/apps/org.tizen.wallpaper-service/data/default_images/myinterest_default.png"
-
-Eina_Bool flag_lock_from_default = EINA_FALSE;
-Eina_Bool flag_lock_from_cp = EINA_FALSE;
-Eina_Bool flag_lock_from_gallery = EINA_FALSE;
-
-Eina_List *cp_wallpaper_list = NULL;
-static bool flag_home_pre_wallpaper_from_default;
-static wallpaper_img_type enum_lock_pre_wallpaper_from_default;
-char lock_path[6][MAX_LENGTH_LINE] = {{0}};
-char home_path[MAX_LENGTH_LINE] = {0};
+#define DEFAULT_IMAGE_DIR "/opt/usr/share/settings/Wallpapers/"
-static char sel_lock_path[6][MAX_LENGTH_LINE] = {{0}};
-static char sel_home_path[MAX_LENGTH_LINE] = {0};
-
-static Eina_Bool flag_sel = EINA_FALSE;
-
-static char sel_naviframe_title[256] = {0};
-static Elm_Object_Item *sel_navi_item = NULL;
-
-wallpaper_ui_service_appdata *ad = NULL;
-
-static unsigned int checked_num = 0;
-static Evas_Object *default_done_btn = NULL;
-static char naviframe_title[256] = {0};
-static Elm_Object_Item *default_navi_item = NULL;
-
-static Evas_Object *default_gengrid = NULL;
-static Evas_Object *default_check = NULL;
+static Elm_Gengrid_Item_Class *gic_for_main = NULL;
+static wallpaper_ui_service_appdata *ad = NULL;
static Elm_Object_Item *nf_it = NULL;
-static char *from[256] = {NULL};
-static char *to[256] = {NULL};
-
-static bool topicon_clicked = false;
+static struct _wallpaper_ui_service_state_data {
+ Eina_Bool flag_changed;
+ Eina_Bool flag_edit_click;
+ Eina_Bool flag_image_from_gallery;
+ char *from[MAX_LENGTH_LINE];
+ char *to[MAX_LENGTH_LINE];
+} state_data = {
+ .flag_changed = EINA_FALSE,
+ .flag_edit_click = EINA_FALSE,
+ .flag_image_from_gallery = EINA_FALSE,
+ .from = { NULL, },
+ .to = { NULL, },
+};
-static Elm_Object_Item *cur_preview_item = NULL;
-static Eina_Bool flag_from_default = EINA_FALSE;
int scale_resize_state = 0;
-static char* last_image = NULL;
-
-
enum {
SCALE_JOB_INIT = -1,
SCALE_JOB_0_BUFFER_MAKING = 0,
@@ -151,135 +90,29 @@ struct scaledata{
Ecore_Idler *idler_handler;
};
-typedef struct node
-{
- char* add_gallery_path;
- struct node * pNext;
-}Node;
-Node* head = NULL;
-
-#define STR_LEN_MAX 4096
-static char homepath[MAX_LENGTH_LINE] = {0};
-static char lockpath[MAX_LENGTH_LINE] = {0};
-
-static int default_wallpaper_num = 0;
static void _service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data);
-static Evas_Object *default_gengrid_add(Evas_Object *parent);
-
-//create link
-bool createNodeList()
-{
- WALLPAPERUI_DBG("createNodeList");
- head = (Node*) malloc(sizeof(Node));
- if(NULL == head)
- {
- WALLPAPERUI_DBG(" createNodeList create fail");
- return false;
- }
- else
- {
- WALLPAPERUI_DBG("createNodeList create sucess");
- head->add_gallery_path = NULL;
- head->pNext = NULL;
- return true;
- }
-}
-
-//add node
-bool addNode(char *path)
-{
- WALLPAPERUI_DBG("addNode");
-
- if(NULL == head)
- {
- WALLPAPERUI_DBG("addNode fail");
- return false;
- }
- Node* node = (Node*)malloc(sizeof(Node));
- Node* p = head->pNext;
- Node* q = head;
- while(NULL != p)
- {
- q = p;
- p = p->pNext;
- }
-
- q->pNext = node;
-
- if (node != NULL) {
- node->pNext = NULL;
- node->add_gallery_path = strdup(path);
- }
- WALLPAPERUI_DBG("addnode node->add_gallery_path = %s",node->add_gallery_path);
- return true;
-}
-
-//destory link
-void destroyNodeList()
-{
- WALLPAPERUI_DBG("destroyNodeList");
- if(NULL == head)
- {
- WALLPAPERUI_DBG("destroyNodeList NULL == head");
- return;
- }
- if(NULL == head->pNext)
- {
- if(NULL != head->add_gallery_path)
- {
- free(head->add_gallery_path);
- head->add_gallery_path = NULL;
- }
- if(NULL != head)
- {
- free(head);
- head = NULL;
- }
- WALLPAPERUI_DBG("destroyNodeList NULL == head->pNext ");
- return;
- }
- Node* p = head->pNext;
- while(NULL != p)
- {
- Node* tmp = p;
- p = p->pNext;
- if(NULL != tmp->add_gallery_path)
- {
- free(tmp->add_gallery_path);
- free(tmp);
- }
- }
- if(NULL !=head->add_gallery_path)
- {
- free(head->add_gallery_path);
- head->add_gallery_path = NULL;
- }
- if(NULL != head)
- {
- free(head);
- head = NULL;
- }
-}
-
-
-
-int wallpaper_txt_list_create(char *filename)
+static void _wallpaper_destroy(void *data);
+static Evas_Object *main_gengrid_add(Evas_Object *parent, void* data);
+static void _edit_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+static int _lockscreen_gallery_scale_job_maker(int to_w, int to_h, int idx);
+static void _lockscreen_gallery_destroy_func();
+static void _wallpaper_show_focus_highlight(int selected_index) ;
+static void _done_to_set_wallpaper();
+static void _wallpaper_back_key_cb(void *data, Evas_Object *obj, void *event_info);
+static void _preview_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+
+static int _wallpaper_txt_list_create(char *filename)
{
WALLPAPERUI_TRACE_BEGIN;
WALLPAPERUI_DBG("filename=%s", filename);
- if(filename == NULL)
- return -1;
-
- if(access(filename, 0) == -1)
- {
+ retv_if (filename == NULL, -1);
+ if (access(filename, 0) == -1) {
WALLPAPERUI_DBG("%s is not exist.", filename);
FILE *file = fopen(filename, "w");
- if(!file)
- {
+ if (!file) {
WALLPAPERUI_DBG("fopen file failed");
- //fclose(file);
return -1;
}
fclose(file);
@@ -288,48 +121,44 @@ int wallpaper_txt_list_create(char *filename)
return 0;
}
-int wallpaper_txt_list_read(char *filename, char path_array[6][MAX_LENGTH_LINE])
+static int _wallpaper_txt_list_read(char *filename, char path_array[6][MAX_LENGTH_LINE])
{
- WALLPAPERUI_DBG("wallpaper_txt_list_read begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
WALLPAPERUI_DBG("filename=%s", filename);
- if(filename == NULL)
- return -1;
+ retv_if (filename == NULL, -1);
FILE *fp = fopen(filename, "r");
- if(!fp)
- {
+ if (!fp) {
WALLPAPERUI_DBG("fopen wallpaper txt file failed.");
return -1;
}
int i = 0;
- while(fgets(path_array[i], MAX_LENGTH_LINE, fp) != NULL)
- {
+ while (fgets(path_array[i], MAX_LENGTH_LINE, fp) != NULL) {
path_array[i][strlen(path_array[i])-1] = '\0';
WALLPAPERUI_DBG("path=%s", path_array[i]);
i++;
}
fclose(fp);
- WALLPAPERUI_DBG("wallpaper_txt_list_read end\n");
+ WALLPAPERUI_TRACE_END;
return i;
}
-int wallpaper_txt_list_write(char *filename, char *path_array[6])
+static int _wallpaper_txt_list_write(char *filename, char *path_array[6])
{
- WALLPAPERUI_DBG("wallpaper_txt_list_write begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
+
FILE *fp = fopen(filename, "w");
- if(!fp)
- {
+ if (!fp) {
WALLPAPERUI_DBG("fopen wallpaper txt file failed.");
return -1;
}
int i = 0;
- while(i < 6)
- {
- if(path_array[i]) {
+ while(i < 6) {
+ if (path_array[i]) {
WALLPAPERUI_DBG("path=%s", path_array[i]);
fprintf(fp, "%s\n", path_array[i]);
WALLPAPERUI_DBG("path=%s", path_array[i]);
@@ -338,40 +167,49 @@ int wallpaper_txt_list_write(char *filename, char *path_array[6])
}
fclose(fp);
- WALLPAPERUI_DBG("wallpaper_txt_list_write end\n");
+
+ WALLPAPERUI_TRACE_END;
return 0;
}
-static int __lockscreen_gallery_file_cb(const char *src, const char *dst)
+static int _lockscreen_gallery_file_cb(const char *src, const char *dst)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
FILE *f1, *f2;
char buf[16384];
size_t num;
int ret = 1;
f1 = fopen(src, "rb");
- if(!f1) return 0;
+ if (!f1) {
+ return 0;
+ }
+
f2 = fopen(dst, "wb");
- if(!f2) {
+ if (!f2) {
fclose(f1);
return 0;
}
- while((num = fread(buf, 1, sizeof(buf), f1)) > 0) {
- if (fwrite(buf, 1, num, f2) != num) ret = 0;
+ while ((num = fread(buf, 1, sizeof(buf), f1)) > 0) {
+ if (fwrite(buf, 1, num, f2) != num) {
+ ret = 0;
+
+ }
}
fclose(f1);
fclose(f2);
+ WALLPAPERUI_TRACE_END;
return ret;
}
-static void rotate_right(Evas_Object *image)
+static void _rotate_right(Evas_Object *image)
{
- WALLPAPERUI_DBG("rotate_right begin\n");
- if(image == NULL)
- return;
+ WALLPAPERUI_TRACE_BEGIN;
+ ret_if (image == NULL);
unsigned int *data1 = NULL;
unsigned int *data2 = NULL;
@@ -383,21 +221,22 @@ static void rotate_right(Evas_Object *image)
int hw = 0;
int iw = 0;
int ih = 0;
+ int size = 0;
evas_object_image_size_get(image, &iw, &ih);
WALLPAPERUI_DBG("iw = %d,ih = %d", iw, ih);
- int size = iw * ih * sizeof(unsigned int);
+ size = iw * ih * sizeof(unsigned int);
/* EINA_FALSE for reading */
data1 = (unsigned int *)evas_object_image_data_get(image, EINA_FALSE);
- if(data1 == NULL) {
+ if (data1 == NULL) {
WALLPAPERUI_DBG("evas_object_image_data_get : data1 failed");
return;
}
/* memcpy */
data2 = (unsigned int *)calloc(1, size);
- if(data2 == NULL) {
+ if (data2 == NULL) {
WALLPAPERUI_DBG("calloc data2 failed");
return;
}
@@ -413,7 +252,7 @@ static void rotate_right(Evas_Object *image)
/* set width, height to image obj */
evas_object_image_size_set(image, iw, ih);
data1 = (unsigned int *)evas_object_image_data_get(image, EINA_TRUE);
- if(data1 == NULL) {
+ if (data1 == NULL) {
WALLPAPERUI_DBG("evas_object_image_data_get : data1 failed2");
free(data2);
return;
@@ -431,20 +270,20 @@ static void rotate_right(Evas_Object *image)
to += hw;
}
- if(data2) {
+ if (data2) {
free(data2);
}
WALLPAPERUI_DBG("final iw = %d,ih = %d", iw, ih);
evas_object_image_data_set(image, data1);
evas_object_image_data_update_add(image, 0, 0, iw, ih);
+
+ WALLPAPERUI_TRACE_BEGIN;
}
-static void rotate_left(Evas_Object *image)
+static void _rotate_left(Evas_Object *image)
{
- WALLPAPERUI_DBG("rotate_left begin\n");
-
- if(image == NULL)
- return;
+ WALLPAPERUI_TRACE_BEGIN;
+ ret_if (image == NULL);
unsigned int *data1 = NULL;
unsigned int *data2 = NULL;
@@ -456,19 +295,20 @@ static void rotate_left(Evas_Object *image)
int hw = 0;
int iw = 0;
int ih = 0;
+ int size = 0;
WALLPAPERUI_DBG("iw = %d,ih = %d", iw, ih);
evas_object_image_size_get(image, &iw, &ih);
- int size = iw * ih * sizeof(unsigned int);
+ size = iw * ih * sizeof(unsigned int);
/* EINA_FALSE for reading */
data1 = (unsigned int *)evas_object_image_data_get(image, EINA_FALSE);
- if(data1 == NULL){
+ if (data1 == NULL) {
WALLPAPERUI_DBG("evas_object_image_data_get : data1 failed");
return;
}
- data2 = (unsigned int *)calloc(1, size);
- if(data2 == NULL){
+ data2 = (unsigned int *)calloc(1, size);
+ if (data2 == NULL) {
WALLPAPERUI_DBG("calloc data2 failed");
return;
}
@@ -484,7 +324,7 @@ static void rotate_left(Evas_Object *image)
/* set width, height to image obj */
evas_object_image_size_set(image, iw, ih);
data1 = (unsigned int *)evas_object_image_data_get(image, EINA_TRUE);
- if(data1 == NULL) {
+ if (data1 == NULL) {
WALLPAPERUI_DBG("evas_object_image_data_get : data1 failed2");
free(data2);
return;
@@ -511,109 +351,85 @@ static void rotate_left(Evas_Object *image)
WALLPAPERUI_DBG("final iw = %d,ih = %d", iw, ih);
evas_object_image_data_set(image, data1);
evas_object_image_data_update_add(image, 0, 0, iw, ih);
+
+ WALLPAPERUI_TRACE_END;
}
-static void rotate_verteical(Evas_Object *image)
+static void _rotate_verteical(Evas_Object *image)
{
- WALLPAPERUI_DBG("rotate_verteical begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
+
+ _rotate_left(image);
+ _rotate_left(image);
- rotate_left(image);
- rotate_left(image);
+ WALLPAPERUI_TRACE_END;
}
-static bool getMediaInfoCb(media_info_h pItem, void *pUserData)
+static bool _get_media_info_cb(media_info_h pItem, void *pUserData)
{
-
- WALLPAPERUI_DBG("getMediaInfoCb begin\n");
-
+ WALLPAPERUI_TRACE_BEGIN;
media_info_h *pAssignFolderItem = (media_info_h*)pUserData;
- if(pItem != NULL)
- {
+ if (pItem != NULL) {
media_info_clone(pAssignFolderItem, pItem);
media_info_get_display_name(*pAssignFolderItem, &pItem);
}
+ WALLPAPERUI_TRACE_END;
return FALSE;
}
-void done_button_cb()
+static void _done_button_cb()
{
- WALLPAPERUI_DBG("done_button_cb begin");
- bool ret = false;
- vconf_get_bool(VCONFKEY_SETAPPL_WALLPAPER_APPLY_COLORTHEME_BOOL, &ret);
-
- if(flag_home_changed && ret){
- ad->sel_popup_data.setas_type = WALLPAPER_POPUP_SETAS_HOMESCREEN;
- WALLPAPERUI_DBG("home_path = %s", home_path);
- if(ad->color_popup_data.file_path!=NULL)
- {
- free(ad->color_popup_data.file_path);
- ad->color_popup_data.file_path = NULL;
- }
- if(flag_color_pallete)
- ad->color_popup_data.file_path = strdup(COLOR_PALLETE_IMAGE);
- else
- ad->color_popup_data.file_path = strdup(home_path);
-
- WALLPAPERUI_DBG();
- popup_color_theme_util_create_view(ad);
- WALLPAPERUI_DBG();
- done_to_set_wallpaper();
- flag_home_changed = EINA_FALSE;
- }else{
- done_to_set_wallpaper();
- }
- WALLPAPERUI_DBG("done_button_cb end");
+ WALLPAPERUI_TRACE_BEGIN;
+
+ _done_to_set_wallpaper();
+
+ WALLPAPERUI_TRACE_END;
}
-static media_content_orientation_e lockscreen_gallery_get_orientation_by_path(const char *path)
+static media_content_orientation_e _lockscreen_gallery_get_orientation_by_path(const char *path)
{
- WALLPAPERUI_DBG("get_orientation_by_path begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
- if(!path)
- {
+ if(!path) {
WALLPAPERUI_ERR("No exist video path.");
return -1;
}
media_info_h pItem = NULL;
filter_h m_FilterHandle = NULL;
- char szTmpStr[STR_LEN_MAX] = {0,};
+ char szTmpStr[MAX_LENGTH_STRING] = {0,};
media_content_orientation_e orientation;
image_meta_h image_handle = NULL;
- if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("Fail to create media filter handle.");
return -1;
}
- memset(szTmpStr, 0, STR_LEN_MAX);
- snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", path);
+ memset(szTmpStr, 0, MAX_LENGTH_STRING);
+ snprintf(szTmpStr, MAX_LENGTH_STRING, "MEDIA_PATH = \"%s\"", path);
WALLPAPERUI_DBG("path = %s", path);
WALLPAPERUI_DBG("szTmpStr = %s", szTmpStr);
- if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("Fail to set filter condition.");
media_filter_destroy(m_FilterHandle);
return -1;
}
- if( media_info_foreach_media_from_db(m_FilterHandle, getMediaInfoCb, &pItem) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_info_foreach_media_from_db(m_FilterHandle, _get_media_info_cb, &pItem) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_DBG("Fail to media_info_foreach_media_from_db");
media_filter_destroy(m_FilterHandle);
return -1;
}
- if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("Fail to destroy media filter handle.");
return -1;
}
- if(pItem)
- {
+ if (pItem) {
if (media_info_get_image(pItem, &image_handle) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("media_info_get_image Failed");
media_info_destroy(pItem);
@@ -623,52 +439,51 @@ static media_content_orientation_e lockscreen_gallery_get_orientation_by_path(co
}
- if(image_handle) {
- if(image_meta_get_orientation(image_handle, &orientation) == MEDIA_CONTENT_ERROR_NONE) {
+ if (image_handle) {
+ if (image_meta_get_orientation(image_handle, &orientation) == MEDIA_CONTENT_ERROR_NONE) {
image_meta_destroy(image_handle);
return orientation;
}
image_meta_destroy(image_handle);
}
+ WALLPAPERUI_TRACE_END;
return -1;
}
-static void rotate_image(Evas_Object *image, const char* path)
+static void _rotate_image(Evas_Object *image, const char* path)
{
- WALLPAPERUI_DBG("rotate_image begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
- if(path == NULL || image == NULL) {
- return;
- }
+ ret_if (path == NULL || image == NULL);
- media_content_orientation_e orientation = lockscreen_gallery_get_orientation_by_path(path);
+ media_content_orientation_e orientation = _lockscreen_gallery_get_orientation_by_path(path);
WALLPAPERUI_DBG("orientation == %d", orientation);
- if (orientation == -1)
- {
- return;
- }
- switch(orientation)
- {
+ ret_if (orientation == -1);
+
+ switch (orientation) {
case MEDIA_CONTENT_ORIENTATION_ROT_180:
- rotate_verteical(image);
+ _rotate_verteical(image);
break;
case MEDIA_CONTENT_ORIENTATION_ROT_90:
- rotate_right(image);
+ _rotate_right(image);
break;
case MEDIA_CONTENT_ORIENTATION_ROT_270:
- rotate_left(image);
+ _rotate_left(image);
break;
case MEDIA_CONTENT_ORIENTATION_NORMAL:
break;
default:
break;
}
+ WALLPAPERUI_TRACE_END;
}
static Eina_Bool _lockscreen_gallery_scale_job_0(void *data)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
static int job_idx = SCALE_JOB_0_BUFFER_MAKING;
Evas_Load_Error err = EVAS_LOAD_ERROR_NONE;
@@ -676,7 +491,7 @@ static Eina_Bool _lockscreen_gallery_scale_job_0(void *data)
struct scaledata *sd = data;
sd->ee = ecore_evas_buffer_new(sd->to_w, sd->to_h);
- if(!sd->ee) {
+ if (!sd->ee) {
WALLPAPERUI_ERR("ecore_evas_buffer_new() failed");
sd->next_job = SCALE_JOB_ERR;
return ECORE_CALLBACK_CANCEL;
@@ -684,33 +499,28 @@ static Eina_Bool _lockscreen_gallery_scale_job_0(void *data)
sd->canvas = ecore_evas_get(sd->ee);
sd->img = evas_object_image_filled_add(sd->canvas);
- if(!sd->img) {
+ if (!sd->img) {
WALLPAPERUI_ERR("evas_object_image_filled_add() failed");
sd->next_job = SCALE_JOB_ERR;
return ECORE_CALLBACK_CANCEL;
}
- if(from[sd->img_idx]) {
- WALLPAPERUI_DBG("from[%s]", from[sd->img_idx]);
+ if (state_data.from[sd->img_idx]) {
+ WALLPAPERUI_DBG("from[%s]", state_data.from[sd->img_idx]);
}
- evas_object_image_file_set(sd->img, from[sd->img_idx], NULL);
+ evas_object_image_file_set(sd->img, state_data.from[sd->img_idx], NULL);
err = evas_object_image_load_error_get(sd->img);
- if(err != EVAS_LOAD_ERROR_NONE) {
+ if (err != EVAS_LOAD_ERROR_NONE) {
WALLPAPERUI_ERR("evas_object_image_file_set() failed");
- WALLPAPERUI_ERR("file(%s) err(%s)", from[sd->img_idx], evas_load_error_str(err));
+ WALLPAPERUI_ERR("file(%s) err(%s)", state_data.from[sd->img_idx], evas_load_error_str(err));
char temp[MAX_LENGTH_LINE] = {0};
- char *p = strrchr(from[sd->img_idx], '/');
- if(p) {
+ char *p = strrchr(state_data.from[sd->img_idx], '/');
+ if (p) {
snprintf(temp, sizeof(temp), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
WALLPAPERUI_DBG("temp = %s", temp);
- if(strcmp(temp, homepath) == 0) {
+ if (strcmp(temp, ad->current_preview_img_path) == 0) {
WALLPAPERUI_DBG("homescreen wallppaer do not be changed");
- flag_home_changed = EINA_FALSE;
- }
- if(strcmp(temp, lockpath) == 0) {
- WALLPAPERUI_DBG("lockscreen wallppaer do not be changed");
- flag_lock_changed = EINA_FALSE;
}
}
@@ -718,19 +528,19 @@ static Eina_Bool _lockscreen_gallery_scale_job_0(void *data)
return ECORE_CALLBACK_CANCEL;
}
- WALLPAPERUI_DBG("from[i]:%s", from[sd->img_idx]);
- if(!strstr(from[sd->img_idx], "wallpaper_list")) {
- WALLPAPERUI_DBG("need rotateRight:%s", from[sd->img_idx]);
- rotate_image(sd->img, from[sd->img_idx]);
+ WALLPAPERUI_DBG("from[i]:%s", state_data.from[sd->img_idx]);
+ if (!strstr(state_data.from[sd->img_idx], "wallpaper_list")) {
+ WALLPAPERUI_DBG("need rotateRight:%s", state_data.from[sd->img_idx]);
+ _rotate_image(sd->img, state_data.from[sd->img_idx]);
}
evas_object_image_alpha_set(sd->img, EINA_FALSE);
evas_object_image_size_get(sd->img, &sd->img_w, &sd->img_h);
- if((sd->img_w == sd->to_w && sd->img_h >= sd->to_h) ||
+ if ((sd->img_w == sd->to_w && sd->img_h >= sd->to_h) ||
(sd->img_h == sd->to_h && sd->img_w >= sd->to_w)) {
- WALLPAPERUI_DBG("No need to be scaled. cp(%s, %s)", from[sd->img_idx], to[sd->img_idx]);
- __lockscreen_gallery_file_cb(from[sd->img_idx], to[sd->img_idx]);
+ WALLPAPERUI_DBG("No need to be scaled. cp(%s, %s)", state_data.from[sd->img_idx], state_data.to[sd->img_idx]);
+ _lockscreen_gallery_file_cb(state_data.from[sd->img_idx], state_data.to[sd->img_idx]);
WALLPAPERUI_DBG("cp end");
sd->next_job = SCALE_JOB_END;
return ECORE_CALLBACK_CANCEL;
@@ -740,15 +550,18 @@ static Eina_Bool _lockscreen_gallery_scale_job_0(void *data)
evas_object_image_fill_set(sd->img, 0, 0, sd->img_w, sd->img_h);
sd->next_job = job_idx+1;
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_1(void *data)
{
- static int job_idx = SCALE_JOB_1_RESIZE_START;
+ WALLPAPERUI_TRACE_BEGIN;
- WALLPAPERUI_DBG("DBG 1 : resize");
+ static int job_idx = SCALE_JOB_1_RESIZE_START;
struct scaledata *sd = data;
+ WALLPAPERUI_DBG("DBG 1 : resize");
sd->to_w = (float)sd->img_w/sd->img_h*sd->to_h;
@@ -759,41 +572,50 @@ static Eina_Bool _lockscreen_gallery_scale_job_1(void *data)
evas_object_show(sd->img);
sd->next_job = job_idx+1;
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_2(void *data)
{
- static int job_idx = SCALE_JOB_2_RENDERING;
+ WALLPAPERUI_TRACE_BEGIN;
- WALLPAPERUI_DBG("DBG 2 : rendering");
+ static int job_idx = SCALE_JOB_2_RENDERING;
struct scaledata *sd = data;
+ WALLPAPERUI_DBG("DBG 2 : rendering");
ecore_evas_manual_render(sd->ee);
sd->next_job = job_idx+1;
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_3(void *data)
{
- static int job_idx = SCALE_JOB_3_BUFFER_GET;
+ WALLPAPERUI_TRACE_BEGIN;
- WALLPAPERUI_DBG("DBG 3 : buffer get");
+ static int job_idx = SCALE_JOB_3_BUFFER_GET;
struct scaledata *sd = data;
+ WALLPAPERUI_DBG("DBG 3 : buffer get");
sd->pixels = (void *)ecore_evas_buffer_pixels_get(sd->ee);
sd->next_job = job_idx+1;
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_4(void *data)
{
- static int job_idx = SCALE_JOB_4_RESIZE_IMAGE;
+ WALLPAPERUI_TRACE_BEGIN;
- WALLPAPERUI_DBG("DBG 4 : resized image");
+ static int job_idx = SCALE_JOB_4_RESIZE_IMAGE;
struct scaledata *sd = data;
+ WALLPAPERUI_DBG("DBG 4 : resized image");
sd->o = evas_object_image_add(sd->canvas);
evas_object_image_size_set(sd->o, sd->to_w, sd->to_h);
@@ -804,65 +626,71 @@ static Eina_Bool _lockscreen_gallery_scale_job_4(void *data)
evas_object_image_colorspace_set(sd->o, EVAS_COLORSPACE_ARGB8888);
sd->next_job = job_idx+1;
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_5(void *data)
{
- static int job_idx = SCALE_JOB_5_SAVE_IMAGE;
+ WALLPAPERUI_TRACE_BEGIN;
- WALLPAPERUI_DBG("DBG 5 : save image");
+ static int job_idx = SCALE_JOB_5_SAVE_IMAGE;
struct scaledata *sd = data;
+ WALLPAPERUI_DBG("DBG 5 : save image");
- Eina_Bool b = evas_object_image_save(sd->o, to[sd->img_idx], NULL, "quality=100 compress=4");
- if(b == EINA_FALSE) {
- WALLPAPERUI_DBG("evas_object_image_save to %s fail!", to[sd->img_idx]);
+ Eina_Bool b = evas_object_image_save(sd->o, state_data.to[sd->img_idx], NULL, "quality=100 compress=4");
+ if (b == EINA_FALSE) {
+ WALLPAPERUI_DBG("evas_object_image_save to %s fail!", state_data.to[sd->img_idx]);
}
sd->next_job = job_idx+1;
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_end(void *data)
{
- static int job_idx = SCALE_JOB_END;
+ WALLPAPERUI_TRACE_BEGIN;
- WALLPAPERUI_DBG("DBG : job end");
struct scaledata *sd = data;
+ int idx = 0;
- if(sd->ee) {
+ if (sd->ee) {
ecore_evas_free(sd->ee);
}
- if(from[sd->img_idx+1] == NULL) {
+ if (state_data.from[sd->img_idx+1] == NULL) {
WALLPAPERUI_ERR("There is no image to process : ALL job end");
free(sd);
- lockscreen_gallery_destroy_func();
+ _lockscreen_gallery_destroy_func();
return ECORE_CALLBACK_CANCEL;
}
- int idx = sd->img_idx;
- int to_w = sd->to_w;
- int to_h = sd->to_h;
+ idx = sd->img_idx;
free(sd);
- if(_lockscreen_gallery_scale_job_maker(480, 800, idx+1) != 0) {
+ if (_lockscreen_gallery_scale_job_maker(480, 800, idx+1) != 0) {
WALLPAPERUI_DBG("All job end");
- lockscreen_gallery_destroy_func();
+ _lockscreen_gallery_destroy_func();
}
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_CANCEL;
}
static Eina_Bool _lockscreen_gallery_scale_job_handler(void *data)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
struct scaledata *sd = data;
WALLPAPERUI_DBG("idx(%d) curr(%d) next(%d)", sd->img_idx, sd->curr_job, sd->next_job);
sd->curr_job = sd->next_job;
- switch(sd->curr_job) {
+ switch (sd->curr_job) {
case SCALE_JOB_INIT :
WALLPAPERUI_ERR("wrong process! : goto job 0");
_lockscreen_gallery_scale_job_0(sd);
@@ -888,7 +716,7 @@ static Eina_Bool _lockscreen_gallery_scale_job_handler(void *data)
case SCALE_JOB_ERR :
WALLPAPERUI_ERR("ERROR");
case SCALE_JOB_END :
- if(sd->idler_handler) {
+ if (sd->idler_handler) {
ecore_idler_del(sd->idler_handler);
sd->idler_handler = NULL;
}
@@ -898,18 +726,21 @@ static Eina_Bool _lockscreen_gallery_scale_job_handler(void *data)
}
WALLPAPERUI_DBG("job(%d) finished : next job(%d)", sd->curr_job, sd->next_job);
+
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_RENEW;
}
-int _lockscreen_gallery_scale_job_maker(int to_w, int to_h, int idx)
+static int _lockscreen_gallery_scale_job_maker(int to_w, int to_h, int idx)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
static int job_idx = SCALE_JOB_INIT;
+ struct scaledata *sd = calloc(1, sizeof(struct scaledata));
scale_resize_state = 1;
WALLPAPERUI_DBG("make scale log(%d)", idx);
-
- struct scaledata *sd = calloc(1, sizeof(struct scaledata));
- if(sd != NULL) {
+ if (sd != NULL) {
sd->img_idx = idx;
sd->to_w = to_w;
sd->to_h = to_h;
@@ -919,807 +750,56 @@ int _lockscreen_gallery_scale_job_maker(int to_w, int to_h, int idx)
sd->idler_handler = ecore_idler_add(_lockscreen_gallery_scale_job_handler, sd);
}
+ WALLPAPERUI_TRACE_END;
return 0;
}
-static void TEST(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("~~~~~TEST!!!!!!");
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-}
-
-
-static void upper_home_icon_click_cb(void *data, Evas_Object *scroller, void *event_info)
-{
- WALLPAPERUI_DBG("~~~~upper_icon_click_cb");
- page_data_s *pd = data;
- int page_no;
- Elm_Object_Item *it;
-
- topicon_clicked = true;
-
- //elm_scroller_current_page_get(pd->scroller, &page_no, NULL);
- page_no = 0;
- WALLPAPERUI_DBG("~~~~~~~~~~page_no = %d", page_no);
- if (pd->current_page != page_no) {
- pd->current_page = page_no;
- flag_home = !flag_home;
-
- if(flag_home){
- elm_object_signal_emit(pd->lockscreen_icon, "home_page", "elm");
- elm_object_signal_emit(pd->home_icon, "home_page", "elm");
- }else{
- elm_object_signal_emit(pd->lockscreen_icon, "lockscreen_page", "elm");
- elm_object_signal_emit(pd->home_icon, "lockscreen_page", "elm");
- }
- }
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- elm_scroller_page_show(pd->scroller, pd->current_page, 0);
- WALLPAPERUI_DBG("flag_home = %d", flag_home);
- WALLPAPERUI_DBG("upper_icon_click_cb end");
-}
-
-
-
-static void upper_lock_icon_click_cb(void *data, Evas_Object *scroller, void *event_info)
-{
- WALLPAPERUI_DBG("~~~~upper_icon_click_cb");
- page_data_s *pd = data;
- int page_no;
- Elm_Object_Item *it;
-
- topicon_clicked = true;
-
- //elm_scroller_current_page_get(pd->scroller, &page_no, NULL);
- page_no = 1;
- WALLPAPERUI_DBG("~~~~~~~~~~page_no = %d", page_no);
- if (pd->current_page != page_no) {
- pd->current_page = page_no;
- flag_home = !flag_home;
-
- if(flag_home){
- elm_object_signal_emit(pd->lockscreen_icon, "home_page", "elm");
- elm_object_signal_emit(pd->home_icon, "home_page", "elm");
- }else{
- elm_object_signal_emit(pd->lockscreen_icon, "lockscreen_page", "elm");
- elm_object_signal_emit(pd->home_icon, "lockscreen_page", "elm");
- }
- }
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- elm_scroller_page_show(pd->scroller, pd->current_page, 0);
- WALLPAPERUI_DBG("flag_home = %d", flag_home);
- WALLPAPERUI_DBG("upper_icon_click_cb end");
-}
-
-static void scroller_scroll_cb(void *data, Evas_Object *scroller, void *event_info)
-{
- WALLPAPERUI_DBG("scroller_scroll_cb begin");
- page_data_s *pd = data;
- int page_no;
- Elm_Object_Item *it;
-
- elm_scroller_current_page_get(pd->scroller, &page_no, NULL);
- WALLPAPERUI_DBG("~~~~~~~~~~page_no = %d", page_no);
- if (pd->current_page != page_no) {
- pd->current_page = page_no;
- flag_home = !flag_home;
-
- if(flag_home){
- elm_object_signal_emit(pd->lockscreen_icon, "home_page", "elm");
- elm_object_signal_emit(pd->home_icon, "home_page", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "text_home_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "home_bar_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "home_bar_ef_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "text_lock_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "lock_bar_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "lock_bar_ef_dim", "elm");
- }else{
- elm_object_signal_emit(pd->lockscreen_icon, "lockscreen_page", "elm");
- elm_object_signal_emit(pd->home_icon, "lockscreen_page", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "text_home_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "home_bar_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "home_bar_ef_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "text_lock_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "lock_bar_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(pd->main_layout), "lock_bar_ef_default", "elm");
- }
- }
- WALLPAPERUI_DBG("flag_home = %d", flag_home);
- WALLPAPERUI_DBG("scroller_scroll_cb end");
-}
-
-static void layout_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- page_data_s *pd = data;
- Evas_Coord w, h;
-
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- evas_object_size_hint_min_set(pd->page[0], w, h);
- evas_object_size_hint_min_set(pd->page[1], w, h);
-
- elm_scroller_page_size_set(pd->scroller, w, h);
- elm_scroller_page_show(pd->scroller, pd->current_page, 0);
-}
-
-void make_home_and_lockscreen_icon(Evas_Object *parent, int falg)
-{
- WALLPAPERUI_DBG("make_home_and_lockscreen_icon begin");
-
- /*home*/
- Evas_Object *home_icon_layout = elm_layout_add(parent);
- elm_layout_file_set(home_icon_layout, EDJDIR"/popup-wallpaper.edj", "home_icon");
- evas_object_size_hint_weight_set(home_icon_layout, 0, 0);
- evas_object_size_hint_align_set(home_icon_layout, 0, EVAS_HINT_FILL);
- if(falg) {
- elm_object_signal_emit(home_icon_layout, "lockscreen_page", "elm");
- }
- edje_object_signal_callback_add(_EDJ(parent), "home_icon_clicked", "edj", TEST, NULL);
- elm_object_part_content_set(parent, "page_home_icon", home_icon_layout);
- evas_object_show(home_icon_layout);
-
- /*lockscreen*/
- Evas_Object *lockscreen_icon_layout = elm_layout_add(parent);
- elm_layout_file_set(lockscreen_icon_layout, EDJDIR"/popup-wallpaper.edj", "lockscreen_icon");
- evas_object_size_hint_weight_set(lockscreen_icon_layout, 0, 0);
- evas_object_size_hint_align_set(lockscreen_icon_layout, 0, EVAS_HINT_FILL);
- if(!falg) {
- elm_object_signal_emit(lockscreen_icon_layout, "home_page", "elm");
- }
- edje_object_signal_callback_add(_EDJ(parent), "lock_icon_clicked", "edj", TEST, NULL);
- elm_object_part_content_set(parent, "page_lockscreen_icon", lockscreen_icon_layout);
- evas_object_show(lockscreen_icon_layout);
- WALLPAPERUI_DBG("make_home_and_lockscreen_icon end");
-
-}
-
-static void _item_check_changed_cb(void *data, Evas_Object *obj, void *event_info)
+static void _main_done_button_cb(void *data, Evas_Object *obj, void *event_info)
{
WALLPAPERUI_TRACE_BEGIN;
- default_item_s *s_item = (default_item_s *)data;
- if(!s_item)
- return;
-
- Eina_Bool check_state = elm_check_state_get(obj);
- if(check_state == EINA_TRUE) {
- checked_num++;
- WALLPAPERUI_DBG("checked_num=%d", checked_num);
- } else {
- checked_num--;
- WALLPAPERUI_DBG("checked_num=%d", checked_num);
- }
+ if (state_data.flag_changed) {
+ Elm_Object_Item *object_item = elm_gengrid_first_item_get(ad->gengrid);
+ Thumbnail *s_item = NULL;
- if(checked_num == 0 || (checked_num > 1 && flag_home)) {
- elm_object_disabled_set(default_done_btn, EINA_TRUE);
- if(checked_num > 1) {
- //notification_status_message_post(dgettext(PKGNAME, "single selection for home screen wallpaper"));
- }
- } else {
- elm_object_disabled_set(default_done_btn, EINA_FALSE);
- }
-
- if(checked_num == elm_gengrid_items_count(default_gengrid)) {
- WALLPAPERUI_DBG("true");
- elm_check_state_set(default_check, EINA_TRUE);
- } else {
- WALLPAPERUI_DBG("false");
- elm_check_state_set(default_check, EINA_FALSE);
- }
-
- snprintf(naviframe_title, sizeof(naviframe_title), "%d/%d", checked_num, default_wallpaper_num);
- elm_object_item_part_text_set(default_navi_item, "default", naviframe_title);
-
- s_item->check_state = check_state;
-}
-
-static void default_item_selected(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- default_item_s *s_item = (default_item_s *)data;
- if(!s_item)
- return;
-
- elm_gengrid_item_selected_set(s_item->item, EINA_FALSE);
-
- if((checked_num >= 6) && (elm_check_state_get(s_item->check) == EINA_FALSE)) {
- WALLPAPERUI_DBG("Maximum number of pictures(6) exceeded.");
- char* strtmp[256]={0,};
- snprintf(strtmp,sizeof(strtmp),APP_STRING("IDS_MEDIABR_POP_MAXIMUM_NUMBER_OF_PICTURES_HPD_EXCEEDED"),6);
- notification_status_message_post(strtmp);
- return;
- }
-
- s_item->check_state= !(elm_check_state_get(s_item->check));
- elm_check_state_set(s_item->check, s_item->check_state);
-
- _item_check_changed_cb((void *)s_item, s_item->check, NULL);
-}
-
-static void color_palette_pressed_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("default_pressed_cb begin");
- if(obj) {
- elm_object_signal_emit(obj, "pressed", "elm");
- }
-
- WALLPAPERUI_DBG("gallery_pressed_cb end");
-}
-
-static void color_palette_unpressed_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("color_palette_unpressed_cb begin");
- if(obj) {
- elm_object_signal_emit(obj, "unpressed", "elm");
- }
- WALLPAPERUI_DBG("color_palette_unpressed_cb end");
-}
-
-static Evas_Object *default_grid_content_get(void *data, Evas_Object *obj, const char *part)
-{
- default_item_s *s_item = (default_item_s *)data;
- if(!s_item) {
- return NULL;
- }
- WALLPAPERUI_DBG("part : %s, s_item->path = %s", part, s_item->path);
- if(part != NULL && !strcmp(part, "elm.swallow.icon"))
- {
- Evas_Object *layout = elm_layout_add(obj);
- if(s_item->is_last == true){
- if(elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "default_gengrid.color_palette_item") == EINA_FALSE)
- {
- WALLPAPERUI_DBG("Cannot load gengrid item edj");
- return NULL;
- }
-
- s_item->content = layout;
- evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_DOWN, color_palette_pressed_cb, NULL);
- evas_object_event_callback_add(layout, EVAS_CALLBACK_MOUSE_UP, color_palette_unpressed_cb, NULL);
- }else {
- if(elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "default_gengrid.item") == EINA_FALSE)
- {
- WALLPAPERUI_DBG("Cannot load gengrid item edj");
- return NULL;
- }
- s_item->content = layout;
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(layout);
- if(flag_home == EINA_FALSE)
- {
- Evas_Object *check = elm_check_add(layout);
- evas_object_propagate_events_set(check, EINA_FALSE);
- elm_check_state_set(check, EINA_FALSE);
- evas_object_repeat_events_set(check, EINA_FALSE);
- elm_object_part_content_set(layout, "check", check);
- s_item->check = check;
+ while (object_item) {
+ s_item = (Thumbnail*)elm_object_item_data_get(object_item);
+ if (s_item && s_item->path && s_item->bSelected) {
+ WALLPAPERUI_DBG("Done button Selected path=%s %d", s_item->path, s_item->index);
+ strncpy(ad->saved_img_path[0], s_item->path, MAX_LENGTH_LINE-1);
+ _done_to_set_wallpaper();
}
-
- Evas_Object *icon = elm_image_add(layout);
- elm_object_part_content_set(layout, "item", icon);
- elm_image_file_set(icon, s_item->path, NULL);
- elm_image_aspect_fixed_set(icon, EINA_TRUE);
- elm_image_fill_outside_set(icon, EINA_TRUE);
- elm_image_preload_disabled_set(icon, EINA_FALSE);
- evas_object_show(icon);
+ object_item = elm_gengrid_item_next_get(object_item);
}
- return layout;
}
- return NULL;
-}
-static void default_home_item_selected(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- default_item_s *s_item = (default_item_s *)data;
- if(!s_item)
- return;
-
- elm_gengrid_item_selected_set(s_item->item, EINA_FALSE);
-
- //edje_object_signal_emit(elm_layout_edje_get(ad->home_gallery_icon_layout), "elm,state,unselected", "app");
- //edje_object_signal_emit(elm_layout_edje_get(ad->home_default_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[1]) {
- elm_object_signal_emit(ad->pd->page[1], "default_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
-
- if (longpress) {
- longpress = EINA_FALSE;
- return;
- }
-
- flag_home_changed = EINA_TRUE;
- ad->flag_home_from_default = EINA_TRUE;
- flag_color_pallete = EINA_FALSE;
-
- memset(home_path, 0, sizeof(home_path));
- strncpy(home_path, s_item->path, sizeof(home_path)-1);
-
- elm_image_file_set(bg_home_icon, home_path, NULL);
- evas_object_show(bg_home_icon);
-
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 1);
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = 1");
-
- done_button_cb();
-
- ad->default_nf_it = NULL;
elm_naviframe_item_pop(ad->navi_bar);
- flag_main = EINA_TRUE;
-}
-
-static void default_grid_content_del(void *data, Evas_Object *obj, const char *part)
-{
- WALLPAPERUI_TRACE_BEGIN;
- default_item_s *s_item = (default_item_s *)data;
- if(!s_item) {
- return;
- }
-
- if(s_item->path) {
- free(s_item->path);
- }
- free(s_item);
-}
-
-void wallpaper_longpress_block(void *data, Evas_Object *obj, void *event_info)
-{
- longpress = EINA_TRUE;
-}
-
-void make_color_pallete_image(int r, int g, int b)
-{
- WALLPAPERUI_TRACE_BEGIN;
- ecore_evas_init();
- Ecore_Evas *ee = ecore_evas_buffer_new(480, 800);
- if(!ee) {
- WALLPAPERUI_ERR("ecore_evas_buffer_new() failed");
- return;
- }
-
- Evas *canvas = ecore_evas_get(ee);
-
- Evas_Object *bg = evas_object_rectangle_add(canvas);
- evas_object_color_set(bg, r, g, b, 255);
- evas_object_move(bg, 0, 0); /* at origin */
- evas_object_resize(bg, 480, 800); /* covers full canvas */
- evas_object_show(bg);
-
- ecore_evas_manual_render(ee);
-
- void *pixels = (void *)ecore_evas_buffer_pixels_get(ee);
-
- Evas_Object *o = ecore_evas_object_image_new(ee);
- evas_object_image_size_set(o, 480, 800);
- evas_object_move(o, 0, 0);
-
- evas_object_image_data_set(o, pixels);
- evas_object_image_alpha_set(o, EINA_TRUE);
- evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888);
- evas_object_image_filled_set(o, EINA_TRUE);
-
- Evas *sub_canvas = ecore_evas_get(o);
- Evas_Object *rect = evas_object_rectangle_add(sub_canvas);
- evas_object_color_set(rect, r, g, b, 255);
- evas_object_move(rect, 0, 0);
- evas_object_resize(rect, 480, 800);
- evas_object_show(rect);
-
- evas_object_show(o);
-
- evas_object_image_save(o, COLOR_PALLETE_IMAGE_NEW, NULL, "quality=100 compress=4");
-
- ecore_evas_free(ee);
- ecore_evas_shutdown();
-
- WALLPAPERUI_TRACE_END;
-
-}
-
-static void service_color_theme_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- char* r_r = NULL;
- char* r_g = NULL;
- char* r_b = NULL;
- app_control_get_extra_data(reply, "r", &r_r);
- app_control_get_extra_data(reply, "g", &r_g);
- app_control_get_extra_data(reply, "b", &r_b);
- if(r_r && r_g && r_b){
- int r = atoi(r_r);
- int g = atoi(r_g);
- int b = atoi(r_b);
- WALLPAPERUI_DBG("R : %d, G : %d, B : %d", r, g, b);
- make_color_pallete_image(r, g, b);
-
- flag_home_changed = EINA_TRUE;
-
- if(flag_home) {
- memset(home_path, 0, sizeof(home_path));
- flag_home_changed = EINA_TRUE;
- }
- if(flag_home) {
- strncpy(home_path, COLOR_PALLETE_IMAGE_NEW, MAX_LENGTH_LINE-1);
- }
-
- if(flag_home) {
- elm_image_file_set(bg_home_icon, home_path, NULL);
- evas_object_show(bg_home_icon);
-
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 1);
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = 1");
- }
-
- ad->default_nf_it = NULL;
- elm_naviframe_item_pop(ad->navi_bar);
- flag_main = EINA_TRUE;
- flag_home_changed = EINA_TRUE;
- ad->flag_home_from_default = EINA_TRUE;
- flag_color_pallete = EINA_TRUE;
-
- if(ad && ad->pd && ad->pd->page[1]) {
- elm_object_signal_emit(ad->pd->page[1], "default_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
-
- done_button_cb();
-
- }
-
- if(r_r) {
- free(r_r);
- }
- if(r_g) {
- free(r_g);
- }
- if(r_b) {
- free(r_b);
- }
-
- WALLPAPERUI_TRACE_END;
-}
-
-
-static void colour_palette_item_selected(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- default_item_s *palette_item = (default_item_s *)data;
- if(!palette_item)
- return;
-
- elm_gengrid_item_selected_set(palette_item->item, EINA_FALSE);
-
- if (longpress) {
- longpress = EINA_FALSE;
- return;
- }
-
- app_control_h svc_handle = NULL;
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- Evas_Object *win = (Evas_Object *)ug_get_window();
- if(win == NULL) {
- app_control_set_window(svc_handle, elm_win_xwindow_get(ad->win));
- }else {
- app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- }
- app_control_set_app_id(svc_handle, "setting-color-theme-efl");
- app_control_add_extra_data(svc_handle, "from", "Wallpaper");
- app_control_send_launch_request(svc_handle, service_color_theme_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
+ _wallpaper_destroy(ad);
WALLPAPERUI_TRACE_END;
}
-static Evas_Object *default_gengrid_add(Evas_Object *parent)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Evas_Object *gengrid = elm_gengrid_add(parent);
-
- /*Elm_Theme *th = elm_theme_new();
- elm_theme_ref_set(th, NULL);
- elm_theme_extension_add(th, EDJDIR"/popup-wallpaper.edj");
- elm_object_theme_set(gengrid, th);*/
-
- elm_scroller_policy_set(gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_gengrid_item_size_set(gengrid, ELM_SCALE_SIZE(160), ELM_SCALE_SIZE(160));
- elm_gengrid_align_set(gengrid, 0.5, 0.0);
- elm_gengrid_horizontal_set(gengrid, EINA_FALSE);
- elm_scroller_bounce_set(gengrid, EINA_FALSE, EINA_FALSE);
- elm_gengrid_multi_select_set(gengrid, EINA_FALSE);
-
- elm_gengrid_select_mode_set(gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
- evas_object_smart_callback_add(gengrid, "longpressed", wallpaper_longpress_block, NULL);
- gic = elm_gengrid_item_class_new();
- gic->item_style = "default";
- gic->func.text_get = NULL;
- gic->func.content_get = default_grid_content_get;
- gic->func.state_get = NULL;
- gic->func.del = default_grid_content_del;
- char *temp = NULL;
- char string[MAX_LENGTH_LINE] = {0};
- default_item_s *s_item = NULL;
- Eina_List *file_list = NULL;
- file_list = ecore_file_ls("/opt/usr/share/settings/Wallpapers");
- int count = eina_list_count(file_list);
- WALLPAPERUI_DBG("count = %d", count);
- if(count > MAX_MULTIPLE_SELECTION) {
- default_wallpaper_num = 6;
- } else {
- default_wallpaper_num = count;
- }
- int i = 0;
- if(count > 0) {
- for(i = 0; i < count; i++) {
- temp = (char *)eina_list_nth(file_list, i);
- WALLPAPERUI_DBG("temp = %s", temp);
- snprintf(string, sizeof(string), "/opt/usr/share/settings/Wallpapers/%s", temp);
- s_item = (default_item_s *)calloc(1, sizeof(default_item_s));
- if (s_item != NULL) {
- s_item->path= strdup(string);
- s_item->check_state = EINA_FALSE;
- s_item->is_last = false;
- if(flag_home == EINA_FALSE)
- {
- s_item->item = elm_gengrid_item_append(gengrid, gic, s_item, default_item_selected, s_item);
- }
- else
- {
- s_item->item = elm_gengrid_item_append(gengrid, gic, s_item, default_home_item_selected, s_item);
- }
- }
- }
- }
-
- /* setting-color-theme-efl is not a platform feature */
- /*
- if(flag_home){
- default_item_s *last_item = (default_item_s *)calloc(1, sizeof(default_item_s));
- last_item->is_last = true;
- last_item->item = elm_gengrid_item_append(gengrid, gic, last_item, colour_palette_item_selected, last_item);
- }
- */
-
- if(file_list!=NULL)
- {
- eina_list_free(file_list);
- }
- return gengrid;
-}
-
-static void default_cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- flag_main = EINA_TRUE;
- ad->default_nf_it = NULL;
- elm_naviframe_item_pop(ad->navi_bar);
-}
-
-static void default_done_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("default_done_button_cb begin");
- if(obj) {
- elm_object_signal_emit(obj, "pressed", "elm");
- }
-
- if(checked_num == 1) {
- memset(lock_path, 0, sizeof(lock_path));
- } else {
- memset(sel_lock_path, 0, sizeof(sel_lock_path));
- }
-
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_gallery_icon_layout), "elm,state,unselected", "app");
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_default_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "default_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
-
- Elm_Object_Item *object_item = elm_gengrid_first_item_get(default_gengrid);
- default_item_s *s_item = NULL;
- int i = 0;
- while(object_item)
- {
- s_item = (default_item_s *)elm_object_item_data_get(object_item);
- if(s_item && s_item->path)
- {
- Eina_Bool check_state = elm_check_state_get(s_item->check);
- if(check_state == EINA_TRUE) {
- WALLPAPERUI_DBG("path=%s", s_item->path);
- if(checked_num == 1) {
- strncpy(lock_path[i], s_item->path, sizeof(lock_path[i])-1);
- i++;
- } else {
- strncpy(sel_lock_path[i], s_item->path, sizeof(sel_lock_path[i])-1);
- i++;
- }
- }
- }
- object_item = elm_gengrid_item_next_get(object_item);
- }
-
- ad->default_nf_it = NULL;
-
- if(checked_num > 1) {
- Evas_Object *popup = elm_popup_add(ad->win);
- elm_object_style_set(popup, "toast");
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_text_set(popup,"elm.text", APP_STRING("IDS_LCKSCN_TPOP_WALLPAPER_WILL_CHANGE_EVERY_TIME_YOU_UNLOCK_DEVICE"));
- elm_popup_timeout_set(popup, 2.0);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- evas_object_show(popup);
-
- memset(lock_path, 0, sizeof(lock_path));
- //set bg_lock_icon
- for(i = 0; (i<MAX_MULTIPLE_SELECTION) && strlen(sel_lock_path[i]) > 0 ; i++) {
- if(i == 0) {
- elm_image_file_set(bg_lock_icon, sel_lock_path, NULL);
- evas_object_show(bg_lock_icon);
- }
-
- strncpy(lock_path[i], sel_lock_path[i], MAX_LENGTH_LINE-1);
- WALLPAPERUI_DBG("lock_path[%d] = %s", i, lock_path[i]);
- }
- }
-
- flag_from_default = EINA_TRUE;
- flag_lock_changed = EINA_TRUE;
- flag_lock_from_default = EINA_TRUE;
- flag_lock_from_gallery = EINA_FALSE;
- flag_lock_from_cp = EINA_FALSE;
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_DEFAULLT);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_DEFAULLT");
-
- elm_naviframe_item_pop(ad->navi_bar);
- flag_main = EINA_TRUE;
-
- done_button_cb();
-}
-
-static void default_select_all_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- Eina_Bool flag = EINA_FALSE;
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
- WALLPAPERUI_DBG("checked_num= %d", checked_num);
- Elm_Object_Item *object_item = elm_gengrid_first_item_get(default_gengrid);
- default_item_s *s_item = NULL;
- while(object_item) {
- s_item = (default_item_s *)elm_object_item_data_get(object_item);
- if (s_item != NULL) {
- if(checked_num == elm_gengrid_items_count(default_gengrid)) {
- flag = EINA_FALSE;
- if(s_item->check)
- elm_check_state_set(s_item->check, EINA_FALSE);
- s_item->check_state = EINA_FALSE;
- }
- else {
- flag = EINA_TRUE;
- if(s_item->check)
- elm_check_state_set(s_item->check, EINA_TRUE);
- s_item->check_state = EINA_TRUE;
- }
- }
- object_item = elm_gengrid_item_next_get(object_item);
- }
-
- if(flag == EINA_FALSE) {
- checked_num = 0;
- elm_object_disabled_set(default_done_btn, EINA_TRUE);
- } else {
- checked_num = elm_gengrid_items_count(default_gengrid);
- if(checked_num > 1 && flag_home) {
- elm_object_disabled_set(default_done_btn, EINA_TRUE);
- //notification_status_message_post(dgettext(PKGNAME, "single selection for home screen wallpaper"));
- }else {
- elm_object_disabled_set(default_done_btn, EINA_FALSE);
- }
- }
-
- snprintf(naviframe_title, sizeof(naviframe_title), "%d/%d", checked_num, elm_gengrid_items_count(default_gengrid));
- elm_object_item_part_text_set(default_navi_item, "default", naviframe_title);
-}
-
-static void select_all_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- Eina_Bool check_state = elm_check_state_get(default_check);
- elm_check_state_set(default_check, !check_state);
-
- default_select_all_cb(NULL, NULL, NULL, NULL);
-}
-
-static void default_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_DBG("default_clicked_cb begin");
- if(obj) {
- elm_object_signal_emit(obj, "unpressed", "elm");
- }
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
- flag_main = EINA_FALSE;
-
- Evas_Object *layout = elm_layout_add(ad->navi_bar);
-
- if(flag_home == EINA_FALSE)
- {
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "wallpaper_lock.default");
- }
- else
- {
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "wallpaper_home.default");
- }
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- /*if(flag_home == EINA_FALSE)
- {
- default_check = elm_check_add(layout);
- evas_object_propagate_events_set(default_check, EINA_FALSE);
- evas_object_smart_callback_add(default_check, "changed", default_select_all_cb, layout);
- edje_object_signal_callback_add(_EDJ(layout), "select_all_click", "edj", select_all_clicked_cb, (void *)default_check);
- elm_object_part_content_set(layout, "check", default_check);
- elm_object_domain_translatable_part_text_set(layout, "text", PKGNAME, APP_STRING("IDS_ST_HEADER_SELECT_ALL_ABB2"));
- }*/
-
- default_gengrid = default_gengrid_add(layout);
- elm_object_part_content_set(layout, "default", default_gengrid);
-
- checked_num = 0;
- if(flag_home == EINA_FALSE){
- snprintf(naviframe_title, sizeof(naviframe_title), "%d/%d", checked_num, default_wallpaper_num);
- WALLPAPERUI_DBG("naviframe_title = %s", naviframe_title);
- }
- else
- {
- snprintf(naviframe_title, sizeof(naviframe_title), APP_STRING("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
- WALLPAPERUI_DBG("naviframe_title = %s", naviframe_title);
- }
-
- default_navi_item = elm_naviframe_item_push(ad->navi_bar, naviframe_title, NULL, NULL, layout, NULL);
- ad->default_nf_it = default_navi_item;
- if(flag_home == EINA_FALSE)
- {
- /* Title Cancel Button */
- Evas_Object *cancel_btn = elm_button_add(ad->navi_bar);
- elm_object_style_set(cancel_btn, "naviframe/title_cancel");
- evas_object_smart_callback_add(cancel_btn, "clicked", default_cancel_button_cb, NULL);
- elm_object_item_part_content_set(default_navi_item, "title_left_btn", cancel_btn);
-
- /* Title Done Button */
- Evas_Object *done_btn = elm_button_add(ad->navi_bar);
- elm_object_style_set(done_btn, "naviframe/title_done");
- evas_object_smart_callback_add(done_btn, "clicked", default_done_button_cb, NULL);
- elm_object_item_part_content_set(default_navi_item, "title_right_btn", done_btn);
-
- elm_object_disabled_set(done_btn, EINA_TRUE);
- default_done_btn = done_btn;
- }
-}
-
static void _gallery_service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
{
WALLPAPERUI_TRACE_BEGIN;
elm_object_disabled_set(ad->win, EINA_FALSE);
- flag_edit_click = EINA_FALSE;
- if(result == APP_CONTROL_RESULT_SUCCEEDED) {
+ state_data.flag_edit_click = EINA_FALSE;
+
+ if (result == APP_CONTROL_RESULT_SUCCEEDED) {
char **path_array = NULL;
int array_length = 0;
- int ret = -1;
- ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length);
+
int j = 0;
- for(j = 0; j < array_length; j++)
+ bool bresult = false;
+
+ if( app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
+
+ for (j = 0; j < array_length; j++) {
WALLPAPERUI_DBG("path_array[%d] = %s", j, path_array[j]);
+ }
- if(!strstr(path_array[0], ".png")
+ if (!strstr(path_array[0], ".png")
&& !strstr(path_array[0], ".PNG")
&& !strstr(path_array[0], ".jpg")
&& !strstr(path_array[0], ".gif")) {
@@ -1728,61 +808,47 @@ static void _gallery_service_imageviewer_ug_result_cb(app_control_h request, app
}
//do not need go into preview_selection
- if(!flag_home && (array_length==1) && path_array[0]) {
- flag_lock_changed = EINA_TRUE;
-
- flag_lock_from_gallery = EINA_TRUE;
- flag_lock_from_default = EINA_FALSE;
- flag_lock_from_cp = EINA_FALSE;
+ if ((array_length==1) && path_array[0]) {
+ state_data.flag_changed = EINA_TRUE;
+ state_data.flag_image_from_gallery = EINA_TRUE;
vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_GALLERY");
- memset(lock_path, 0, sizeof(lock_path));
- strncpy(lock_path[0], path_array[0], MAX_LENGTH_LINE-1);
- WALLPAPERUI_DBG("lock_path[0] is %s", lock_path[0]);
-
- elm_image_file_set(bg_lock_icon, lock_path[0], NULL);
- evas_object_show(bg_lock_icon);
-
- //add gallery node for deleting gallery added newly
- bool bresult = false;
- if(NULL == head)
- {
- WALLPAPERUI_DBG("_gallery_service_imageviewer_ug_result_cb home screen head = null");
- bresult = createNodeList();
- if(true == bresult && head)
- {
- WALLPAPERUI_DBG("_gallery_service_imageviewer_ug_result_cb home screen true == bresult");
- head->add_gallery_path = strdup(path_array[0]);
- }
- }
- else
- {
- addNode(path_array[0]);
- }
+ memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
+ strncpy(ad->saved_img_path[0], path_array[0], MAX_LENGTH_LINE-1);
+ WALLPAPERUI_DBG("ad->saved_img_path[0] is %s", ad->saved_img_path[0]);
+
+ elm_image_file_set(ad->preview_image, ad->saved_img_path[0], NULL);
}
int i = 0;
- for(i=0; i<array_length; i++) {
- if(path_array[i]) {
+ for (i=0; i<array_length; i++) {
+ if (path_array[i]) {
free(path_array[i]);
path_array[i] = NULL;
}
}
- done_button_cb();
+ _done_button_cb();
+ }
}
+ WALLPAPERUI_TRACE_END;
}
-static void service_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
+static void _service_gallery_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
{
- WALLPAPERUI_DBG("service_gallery_ug_result_cb begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
+
char **path_array = NULL;
int array_length = 0;
+ Elm_Object_Item *object_item = NULL;
+ bool bresult = false;
+ int i = 0;
+ Thumbnail *item = NULL;
if(app_control_get_extra_data_array(reply, APP_CONTROL_DATA_SELECTED, &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
WALLPAPERUI_DBG("array_length = %d", array_length);
- int i = 0;
+
if(array_length < 1) {
WALLPAPERUI_DBG("array_length < 1, do not get result from gallery");
return;
@@ -1814,119 +880,60 @@ static void service_gallery_ug_result_cb(app_control_h request, app_control_h re
}
}
- if(flag_home){
- flag_home_changed = EINA_TRUE;
- ad->flag_home_from_default = EINA_FALSE;
-
- //edje_object_signal_emit(elm_layout_edje_get(ad->home_gallery_icon_layout), "elm,state,selected", "app");
- //edje_object_signal_emit(elm_layout_edje_get(ad->home_default_icon_layout), "elm,state,unselected", "app");
- if(ad && ad->pd && ad->pd->page[1]) {
- elm_object_signal_emit(ad->pd->page[1], "gallery_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
-
- memset(home_path, 0, sizeof(home_path));
- strcpy(home_path, path_array[0]);
- WALLPAPERUI_DBG("home_path is %s", home_path);
-
- elm_image_file_set(bg_home_icon, home_path, NULL);
- evas_object_show(bg_home_icon);
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 0);
- bool bresult = false;
- if(NULL == head)
- {
- WALLPAPERUI_DBG("0000000 service_gallery_ug_result_cb head = null");
- bresult = createNodeList();
- if(true == bresult && head)
- {
- WALLPAPERUI_DBG("0000 service_gallery_ug_result_cb true == bresult");
- head->add_gallery_path = strdup(path_array[0]);
- WALLPAPERUI_DBG("0000 head->add_gallery_path = %s",head->add_gallery_path);
- }
- }
- else
- {
- WALLPAPERUI_DBG("0000 service_gallery_ug_result_cb addNode");
- addNode(path_array[0]);
- }
- flag_color_pallete = EINA_FALSE;
-
- done_button_cb();
- }else {
- flag_lock_changed = EINA_TRUE;
- flag_lock_from_default = EINA_FALSE;
- flag_lock_from_gallery = EINA_TRUE;
- flag_lock_from_cp = EINA_FALSE;
-
-#if !DiSABLE_CROP_VIEW
- if(array_length == 1) {
- WALLPAPERUI_DBG("array_length == 1");
- elm_object_disabled_set(ad->win, EINA_TRUE);
- flag_edit_click = EINA_TRUE;
- WALLPAPERUI_DBG("0 flag_edit_click=%d",flag_edit_click);
- app_control_h pService;
- app_control_create(&pService);
- app_control_set_operation(pService, "http://tizen.org/appcontrol/operation/image/crop");
- app_control_set_uri(pService, path_array[0]);
- app_control_add_extra_data(pService, "http://tizen.org/appcontrol/data/image/crop_mode", "fit_to_screen");
- Evas_Object *win = (Evas_Object *)ug_get_window();
- app_control_set_window(pService, elm_win_xwindow_get(win));
- app_control_send_launch_request(pService, _gallery_service_imageviewer_ug_result_cb, data);
- app_control_destroy(pService);
-/* memset(lock_path, 0, sizeof(lock_path));
- strcpy(lock_path[0], path_array[0]);
- elm_image_file_set(bg_lock_icon, lock_path[0], NULL);
- evas_object_show(bg_lock_icon);
-
- done_button_cb();*/
-
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "gallery_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- } else if(array_length > 1) {
- notification_status_message_post(dgettext(PKGNAME, "IDS_LCKSCN_TPOP_WALLPAPER_WILL_CHANGE_EVERY_TIME_YOU_UNLOCK_DEVICE"));
- memset(sel_lock_path, 0, sizeof(sel_lock_path));
- for(i=0; i<array_length; i++){
- WALLPAPERUI_DBG("path_array is %s", path_array[i]);
- strcpy(sel_lock_path[i], path_array[i]);
- }
+ memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
+ strncpy(ad->saved_img_path, path_array[0], MAX_LENGTH_LINE-1);
+ WALLPAPERUI_DBG("saved_img_path is %s", ad->saved_img_path[0]);
+
+ elm_image_file_set(ad->preview_image, ad->saved_img_path[0], NULL);
+ evas_object_show(ad->preview_image);
+
+ object_item = elm_gengrid_first_item_get(ad->gengrid);
+
+ item = (Thumbnail *)elm_object_item_data_get(object_item);
+ item->bSelected = EINA_TRUE;
+ item->path = ad->saved_img_path[0];
+ item->type = WALLPAPER_TYPE_GALLERY;
+ ad->preview_image_type = WALLPAPER_TYPE_GALLERY;
+
+ elm_object_item_data_set(object_item, item);
+ elm_gengrid_item_update(object_item);
+ elm_object_signal_emit(ad->main_layout, "show_preview", "preview_image");
+
+ _wallpaper_show_focus_highlight(item->index);
+
+ state_data.flag_edit_click = EINA_FALSE;
+ state_data.flag_image_from_gallery = EINA_TRUE;
+ state_data.flag_changed = EINA_TRUE;
+
+ }
- flag_from_default = EINA_FALSE;
- sel_wallpaper_preveiw_main();
- }
-#else
- memset(lock_path, 0, sizeof(lock_path));
- for(i=0; i<array_length; i++){
- WALLPAPERUI_DBG("path_array is %s", path_array[i]);
- strncpy(lock_path[i], path_array[i], MAX_LENGTH_LINE-1);
- }
- flag_from_default = EINA_FALSE;
- done_button_cb();
-#endif
- }
- }
- WALLPAPERUI_DBG("service_gallery_ug_result_cb end\n");
+ WALLPAPERUI_TRACE_END;
}
-static void gallery_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+static void _gallery_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
- WALLPAPERUI_DBG("gallery_clicked_cb begin");
- if(obj) {
+ WALLPAPERUI_TRACE_BEGIN;
+
+ Thumbnail *item = (Thumbnail *)data;
+ elm_gengrid_item_selected_set(item->item, EINA_FALSE);
+ app_control_h svc_handle = NULL;
+ Evas_Object *win = NULL;
+
+ if (obj) {
elm_object_signal_emit(obj, "unpressed", "elm");
}
+
feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- app_control_h svc_handle = NULL;
- if(!app_control_create(&svc_handle)) {
+
+ if (!app_control_create(&svc_handle)) {
app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- Evas_Object *win = (Evas_Object *)ug_get_window();
- if(win == NULL) {
- app_control_set_window(svc_handle, elm_win_xwindow_get(ad->win));
- }else {
- app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- }
- app_control_set_app_id(svc_handle, "gallery-efl");
+ win = (Evas_Object *)ug_get_window();
+ app_control_set_launch_mode(svc_handle, APP_CONTROL_LAUNCH_MODE_GROUP);
+ app_control_set_app_id(svc_handle, "ug-gallery-efl");
app_control_set_mime(svc_handle, "image/*");
- if(!flag_home) {
+
+ if (!DISABLE_MULTISELECTION) {
app_control_add_extra_data(svc_handle, "max-count", "6");
app_control_add_extra_data(svc_handle, "launch-type", "select-multiple");
} else {
@@ -1940,129 +947,116 @@ static void gallery_clicked_cb(void *data, Evas_Object *obj, const char *emissio
}
app_control_add_extra_data(svc_handle, "file-type","image");
app_control_add_extra_data(svc_handle, "hide-personal", "true");
- app_control_send_launch_request(svc_handle, service_gallery_ug_result_cb, data);
+ app_control_send_launch_request(svc_handle, _service_gallery_ug_result_cb, data);
app_control_destroy(svc_handle);
}
- WALLPAPERUI_DBG("gallery_clicked_cb end");
+ WALLPAPERUI_TRACE_END;
}
-static void page_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+static bool _wallpaper_db_create_filter(filter_handle *filter)
{
- WALLPAPERUI_DBG("page_clicked_cb begin");
-
- if(topicon_clicked){
- topicon_clicked = false;
- return;
- }
-
- Evas_Object *navi_bar = (Evas_Object *)data;
- if(navi_bar == NULL) {
- return;
- }
-
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- wallpaper_preveiw_main();
- WALLPAPERUI_DBG("page_clicked_cb end");
-}
-
+ WALLPAPERUI_TRACE_BEGIN;
-bool wallpaper_db_create_filter(filter_handle *filter)
-{
filter_h *media_filter = (filter_h *)filter;
int ret = MEDIA_CONTENT_ERROR_NONE;
ret = media_filter_create(media_filter);
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("media_filter_create is failed, err");
return false;
}
- WALLPAPERUI_DBG("wpug_db_create_filter success");
+
+ WALLPAPERUI_TRACE_END;
return true;
}
-bool wallpaper_db_destroy_filter(filter_handle filter)
+static bool _wallpaper_db_destroy_filter(filter_handle filter)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
filter_h media_filter = (filter_h)filter;
int ret = MEDIA_CONTENT_ERROR_NONE;
ret = media_filter_destroy(media_filter);
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("media_filter_destroy is failed, err");
return false;
}
- WALLPAPERUI_DBG("wpug_db_destroy_filter success");
+
+ WALLPAPERUI_TRACE_END;
return true;
}
-bool wallpaper_db_set_filter_condition(filter_handle media_filter, const char *condition)
+static bool _wallpaper_db_set_filter_condition(filter_handle media_filter, const char *condition)
{
- if(condition == NULL)
- return false;
+ WALLPAPERUI_TRACE_BEGIN;
+ retv_if(condition == NULL, false);
WALLPAPERUI_DBG("Set DB Filter : %s", condition);
+
int ret = media_filter_set_condition(media_filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("media_filter_set_condition is failed, err");
return false;
}
ret = media_filter_set_order(media_filter, MEDIA_CONTENT_ORDER_DESC, "MEDIA_MODIFIED_TIME", MEDIA_CONTENT_COLLATE_DEFAULT);
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("media_filter_set_condition is failed, err");
return false;
}
+ WALLPAPERUI_TRACE_END;
return true;
}
static bool _media_item_cb(media_info_h item, void *user_data)
{
- WALLPAPERUI_DBG("_media_item_cb");
+ WALLPAPERUI_TRACE_BEGIN;
+
media_handle *m_handle = (media_handle *)user_data;
media_info_clone((media_info_h *)m_handle, item);
- return false; //only 1 item
+ WALLPAPERUI_TRACE_END;
+ return false;//only 1 item
}
-char* get_last_image_from_db()
+static char* _get_last_image_from_db()
{
- WALLPAPERUI_DBG("get_last_image_from_db Begin");
+ WALLPAPERUI_TRACE_BEGIN;
int ret = MEDIA_CONTENT_ERROR_NONE;
filter_handle media_filter = NULL;
-
char buf[1024] = {0,};
- snprintf(buf, sizeof(buf), "MEDIA_TYPE=0");
-
media_handle m_handle = NULL;
+ int media_count = 0;
+ char* thumbnailPath = NULL;
+
+ snprintf(buf, sizeof(buf), "MEDIA_TYPE=0");
- if(wallpaper_db_create_filter(&media_filter) == false) {
+ if (_wallpaper_db_create_filter(&media_filter) == false) {
return NULL;
}
- if(wallpaper_db_set_filter_condition(media_filter, buf) == false) {
- wallpaper_db_destroy_filter(media_filter);
+
+ if (_wallpaper_db_set_filter_condition(media_filter, buf) == false) {
+ _wallpaper_db_destroy_filter(media_filter);
return NULL;
}
- int media_count = 0;
+
media_info_get_media_count_from_db(media_filter, &media_count);
- if(media_count == 0) {
- wallpaper_db_destroy_filter(media_filter);
+ if (media_count == 0) {
+ _wallpaper_db_destroy_filter(media_filter);
return NULL;
}
+
ret = media_info_foreach_media_from_db(media_filter, _media_item_cb, &m_handle);
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("media_info_foreach_media_from_db is failed, err");
}
- char* thumbnailPath = NULL;
- if(m_handle) {
+ if (m_handle) {
if (media_info_get_thumbnail_path(m_handle, &thumbnailPath) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR("Get media type failed!");
}
@@ -2070,519 +1064,226 @@ char* get_last_image_from_db()
free(m_handle);
}
- wallpaper_db_destroy_filter(media_filter);
+ _wallpaper_db_destroy_filter(media_filter);
- WALLPAPERUI_DBG("get_last_image_from_db End");
+ WALLPAPERUI_TRACE_END;
return thumbnailPath;
}
-#if !DISABLE_CP_WALLPAPER
-static void my_interests_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- WALLPAPERUI_DBG("my_interests_clicked_cb begin");
- if(obj) {
- elm_object_signal_emit(obj, "unpressed", "elm");
- }
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
- flag_main = EINA_FALSE;
- cp_wallpaper_main(ad);
-
- WALLPAPERUI_DBG("my_interests_clicked_cb end");
-
-}
-
-void make_my_interests_icon(Evas_Object *parent)
-{
- WALLPAPERUI_DBG("make_my_interests_icon begin");
- /*my_interests*/
- Evas_Object *my_interests_icon_layout = elm_layout_add(parent);
- elm_layout_file_set(my_interests_icon_layout, EDJDIR"/popup-wallpaper.edj", "default_and_gallery_icon");
- evas_object_size_hint_weight_set(my_interests_icon_layout, 0, 0);
- evas_object_size_hint_align_set(my_interests_icon_layout, 0, EVAS_HINT_FILL);
-
- Evas_Object *default_bg_icon = elm_image_add(my_interests_icon_layout);
- elm_image_file_set(default_bg_icon, ICONDIR"/no_gallery_interest_bg.png", NULL);
- elm_image_aspect_fixed_set(default_bg_icon, EINA_FALSE);
- elm_image_preload_disabled_set(default_bg_icon, EINA_FALSE);
- elm_object_part_content_set(my_interests_icon_layout, "default_bg", default_bg_icon);
- evas_object_show(default_bg_icon);
-
- ad->lock_cp_icon_layout = my_interests_icon_layout;
-
- int vconf = -1;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &vconf);
- if(vconf == WALLPAPER_TYPE_CP) {
- //edje_object_signal_emit(elm_layout_edje_get(my_interests_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "my_interests_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- }
-
- /*Evas_Object *my_interests_icon = elm_image_add(my_interests_icon_layout);
- elm_image_file_set(my_interests_icon, ICONDIR"/my_favorite_ic.png", NULL);
- elm_image_aspect_fixed_set(my_interests_icon, EINA_FALSE);
- elm_image_preload_disabled_set(my_interests_icon, EINA_FALSE);
- elm_object_part_content_set(my_interests_icon_layout, "image", my_interests_icon);
- evas_object_show(my_interests_icon);*/
-
- elm_object_translatable_part_text_set(my_interests_icon_layout, "text", APP_STRING("IDS_LCKSCN_BUTTON2_MY_INTERESTSM_PREFERRED_CATEGORIES_ABB"));
-
- //evas_object_event_callback_add(my_interests_icon_layout, EVAS_CALLBACK_MOUSE_DOWN, my_interests_pressed_cb, NULL);
- //evas_object_event_callback_add(my_interests_icon_layout, EVAS_CALLBACK_MOUSE_UP, my_interests_clicked_cb, NULL);
- elm_object_signal_callback_add(my_interests_icon_layout, "default_and_gallery_icon", "clicked", my_interests_clicked_cb, NULL);
- elm_object_part_content_set(parent, "page_my_interests_icon", my_interests_icon_layout);
- evas_object_show(my_interests_icon_layout);
- WALLPAPERUI_DBG("make_my_interests_icon end");
-
-}
-#endif
-
-void make_default_and_gallery_icon(Evas_Object *parent, void *data, int flag)
-{
- WALLPAPERUI_DBG("make_default_and_gallery_icon begin");
- wallpaper_ui_service_appdata *ad= (wallpaper_ui_service_appdata *)data;
-
- ret_if(ad == NULL);
-
- /*default*/
- Evas_Object *default_icon_layout = elm_layout_add(parent);
- elm_layout_file_set(default_icon_layout, EDJDIR"/popup-wallpaper.edj", "default_and_gallery_icon");
- evas_object_size_hint_weight_set(default_icon_layout, 0, 0);
- evas_object_size_hint_align_set(default_icon_layout, 0, EVAS_HINT_FILL);
-
- Evas_Object *default_bg_icon = elm_image_add(default_icon_layout);
- elm_image_file_set(default_bg_icon, ICONDIR"/thumbnail_default_bg.png", NULL);
- elm_image_aspect_fixed_set(default_bg_icon, EINA_FALSE);
- elm_image_preload_disabled_set(default_bg_icon, EINA_FALSE);
- elm_object_part_content_set(default_icon_layout, "default_bg", default_bg_icon);
- evas_object_show(default_bg_icon);
-
- /*Evas_Object *default_icon = elm_image_add(default_icon_layout);
- elm_image_file_set(default_icon, ICONDIR"/Wallpaper_ic.png", NULL);
- elm_image_aspect_fixed_set(default_icon, EINA_FALSE);
- elm_image_preload_disabled_set(default_icon, EINA_FALSE);
- elm_object_part_content_set(default_icon_layout, "image", default_icon);
- evas_object_show(default_icon);*/
-
- elm_object_translatable_part_text_set(default_icon_layout, "text", APP_STRING("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
-
- //evas_object_event_callback_add(default_icon_layout, EVAS_CALLBACK_MOUSE_DOWN, default_pressed_cb, NULL);
- //evas_object_event_callback_add(default_icon_layout, EVAS_CALLBACK_MOUSE_UP, default_clicked_cb, NULL);
- elm_object_signal_callback_add(default_icon_layout, "default_and_gallery_icon", "clicked", default_clicked_cb, NULL);
- elm_object_part_content_set(parent, "page_default_wallpaper_icon", default_icon_layout);
- evas_object_show(default_icon_layout);
-
-#if !DISALBE_GALLERY_WALLPAPER
- /*gallery*/
- Evas_Object *gallery_icon_layout = elm_layout_add(parent);
- elm_layout_file_set(gallery_icon_layout, EDJDIR"/popup-wallpaper.edj", "default_and_gallery_icon");
- evas_object_size_hint_weight_set(gallery_icon_layout, 0, 0);
- evas_object_size_hint_align_set(gallery_icon_layout, 0, EVAS_HINT_FILL);
-
- Evas_Object *gallery_icon = elm_image_add(gallery_icon_layout);
-
- if(last_image != NULL) {
- elm_image_file_set(gallery_icon, last_image, NULL);
- }else {
- elm_image_file_set(gallery_icon, ICONDIR"/no_gallery_bg.png", NULL);
- }
-
- /*Evas_Object *gallery_special_icon = elm_image_add(gallery_icon_layout);
- elm_image_file_set(gallery_special_icon, ICONDIR"/No_gallery_ic.png", NULL);
- elm_image_aspect_fixed_set(gallery_special_icon, EINA_FALSE);
- elm_image_preload_disabled_set(gallery_special_icon, EINA_FALSE);
- elm_object_part_content_set(gallery_icon_layout, "image", gallery_special_icon);
- evas_object_show(gallery_special_icon);*/
-
- elm_image_aspect_fixed_set(gallery_icon, EINA_TRUE);
- elm_image_fill_outside_set(gallery_icon, EINA_TRUE);
- elm_image_preload_disabled_set(gallery_icon, EINA_FALSE);
- //elm_image_aspect_fixed_set(gallery_special_icon, EINA_FALSE);
- elm_object_part_content_unset(gallery_icon_layout, "default_bg");
- elm_object_part_content_set(gallery_icon_layout, "default_bg", gallery_icon);
- evas_object_show(gallery_icon);
-
- elm_object_translatable_part_text_set(gallery_icon_layout, "text", APP_STRING("IDS_LCKSCN_BODY_GALLERY"));
-
- //evas_object_event_callback_add(gallery_icon_layout, EVAS_CALLBACK_MOUSE_UP, gallery_clicked_cb, NULL);
- //evas_object_event_callback_add(gallery_icon_layout, EVAS_CALLBACK_MOUSE_DOWN, gallery_pressed_cb, NULL);
- elm_object_signal_callback_add(gallery_icon_layout, "default_and_gallery_icon", "clicked", gallery_clicked_cb, NULL);
- elm_object_part_content_set(parent, "page_gallery_icon", gallery_icon_layout);
- evas_object_show(gallery_icon_layout);
-
- if(flag) {
- ad->lock_gallery_icon = gallery_icon;
- ad->lock_gallery_icon_layout = gallery_icon_layout;
- ad->lock_default_icon_layout = default_icon_layout;
- }else {
- ad->home_gallery_icon = gallery_icon;
- ad->home_gallery_icon_layout = gallery_icon_layout;
- ad->home_default_icon_layout = default_icon_layout;
- }
-#endif
-
-
- int vconf = -1;
- if(flag) {
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &vconf);
- if(vconf == WALLPAPER_TYPE_DEFAULLT) {
- //edje_object_signal_emit(elm_layout_edje_get(default_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "default_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- } else if(vconf == WALLPAPER_TYPE_GALLERY) {
- //edje_object_signal_emit(elm_layout_edje_get(gallery_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "gallery_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- } else if(vconf == WALLPAPER_TYPE_CP) {
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "my_interests_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- }
- } else {
- vconf_get_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, &vconf);
- if(vconf == 1) {
- //edje_object_signal_emit(elm_layout_edje_get(default_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[1]) {
- elm_object_signal_emit(ad->pd->page[1], "default_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- } else {
- //edje_object_signal_emit(elm_layout_edje_get(gallery_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[1]) {
- elm_object_signal_emit(ad->pd->page[1], "gallery_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
- }
- }
-
- WALLPAPERUI_DBG("make_default_and_gallery_icon end");
-
-}
-
-static void popup_cancel_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Object *popup = data;
- evas_object_del(popup);
- popup = NULL;
-}
-
-static void popup_discard_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+static void _main_cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
{
WALLPAPERUI_TRACE_BEGIN;
- Evas_Object *popup = data;
- evas_object_del(popup);
- popup = NULL;
-
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, flag_home_pre_wallpaper_from_default);
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = %d", flag_home_pre_wallpaper_from_default);
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, enum_lock_pre_wallpaper_from_default);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = %d", enum_lock_pre_wallpaper_from_default);
-
- flag_color_pallete = flag_pre_color_pallete;
- wallpaper_destory(ad);
- WALLPAPERUI_TRACE_END;
-}
-
-
-static void cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_DBG("cancel_button_cb begin");
- flag_color_pallete = flag_pre_color_pallete;
- wallpaper_destory(ad);
+ _wallpaper_destroy(ad);
WALLPAPERUI_DBG("cancel_button_cb end");
+ WALLPAPERUI_TRACE_END;
}
-static void set_lock_wallpaper(char *path)
+static void _set_wallpaper(char *path)
{
WALLPAPERUI_TRACE_BEGIN;
- if(ecore_file_exists(path) != EINA_TRUE) {
+ WALLPAPERUI_ERR("set wallpaper : %s", path);
+ if (ecore_file_exists(path) != EINA_TRUE) {
WALLPAPERUI_ERR("%s does not exist", path);
return;
- }
+ }
- elm_image_file_set(bg_lock_icon, path, NULL);
- evas_object_show(bg_lock_icon);
+ vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, ad->preview_image_type);
+ WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE %d", ad->preview_image_type);
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, path) != 0)
- {
+ elm_image_file_set(ad->preview_image, path, NULL);
+ evas_object_show(ad->preview_image);
+
+ // lockscreen
+ if (system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, path) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("Lockscreen set Error : %s", path);
elm_exit();
return;
}
+
+ // homescreen
+ if (system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, path) != SYSTEM_SETTINGS_ERROR_NONE) {
+ WALLPAPERUI_ERR("Homescreen set Error : %s", path);
+ elm_exit();
+ return;
+ }
+
+ WALLPAPERUI_TRACE_END;
}
-static void set_home_wallpaper(char *path)
+static void _set_home_wallpaper(char *path)
{
WALLPAPERUI_TRACE_BEGIN;
- if(ecore_file_exists(path) != EINA_TRUE) {
+ if (ecore_file_exists(path) != EINA_TRUE) {
WALLPAPERUI_ERR("%s does not exist", path);
return;
}
- elm_image_file_set(bg_home_icon, path, NULL);
- evas_object_show(bg_home_icon);
-
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, path) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ if (system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, path) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_set_value_string() failed");
elm_exit();
return;
}
+ WALLPAPERUI_TRACE_END;
}
static int _compare_cb(const void *d1, const void *d2)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
char *v1 = (char *)d1;
char *v2 = (char *)d2;
+
+ WALLPAPERUI_TRACE_END;
return strcmp(v1, v2);
}
-void done_to_set_wallpaper()
+static void _done_to_set_wallpaper()
{
- WALLPAPERUI_DBG("done_to_set_wallpaper begin");
+ WALLPAPERUI_TRACE_BEGIN;
+
char path[6][MAX_LENGTH_LINE] = {{0}};
+ char *p = NULL;
+ char filepath[MAX_LENGTH_LINE] = {0};
+ char filename[MAX_LENGTH_LINE] = {0};
+ char *q = NULL;
+ int i = 0;
+ int index = 0;
+ char *temp_path[6] = {NULL};
+ bool flag = true;
+ int count = 0;
+ char *temp = NULL;
+ char string[MAX_LENGTH_LINE] = {0};
+ Eina_List *path_list = NULL;
+ Eina_List *file_list = NULL;
- if(!flag_home_changed && !flag_lock_changed) {
- int count = wallpaper_txt_list_read(WALLPAPER_TXT_FILE, path);
+
+ if (!state_data.flag_changed) {
+ int count = _wallpaper_txt_list_read(WALLPAPER_TXT_FILE, path);
WALLPAPERUI_DBG("count=%d", count);
- if(count > 0)
- {
+ if(count > 0) {
WALLPAPERUI_DBG("path[0]=%s", path[0]);
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, path[0]) != 0)
- {
+ if (system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, path[0]) != 0) {
WALLPAPERUI_DBG("Lockscreen set Error : %s", path[1]);
}
}
-// wallpaper_destory(ad);
+// _wallpaper_destroy(ad);
WALLPAPERUI_DBG("NO CHANGE");
return;
}
- char *p = NULL;
- char filepath[MAX_LENGTH_LINE] = {0};
- char filename[MAX_LENGTH_LINE] = {0};
- char *q = NULL;
- int i = 0;
- int index = 0;
- if(flag_lock_changed && !flag_lock_from_cp) {
- //copy lock wallpaper
- char *temp_path[6] = {NULL};
- bool flag = true;
- while(i < MAX_MULTIPLE_SELECTION) {
- if(strlen(lock_path[i])>1) {
- WALLPAPERUI_DBG("lock_path[%d] = %s", i, lock_path[i]);
- p = strrchr(lock_path[i], '/');
- if(p) {
- q = strrchr(p, '.');
- if((strcmp(q, ".gif") == 0) || (strcmp(q, ".wbmp") == 0) || (strcmp(q, ".bmp") == 0)) {
- WALLPAPERUI_DBG(".gif||.wbmp||.bmp image");
- strncpy(filename, p, MAX_LENGTH_LINE-1);
- q = strrchr(filename, '.');
- if(q) {
- *q = '\0';
- }
- snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s.jpg", filename);
- } else {
- WALLPAPERUI_DBG("other image");
- snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
- }
- WALLPAPERUI_DBG("filepath = %s", filepath);
- if(flag_lock_from_default || flag_lock_from_cp){
- copy_wallpaper_file(lock_path[i], filepath);
- }
- if(from[index]!=NULL)
- {
- free(from[index]);
- from[index]=NULL;
+ //copy lock wallpaper
+ while (i < MAX_MULTIPLE_SELECTION) {
+ if (strlen(ad->saved_img_path[i])>1) {
+ WALLPAPERUI_DBG("saved_img_path[%d] = %s", i, ad->saved_img_path[i]);
+ p = strrchr(ad->saved_img_path[i], '/');
+ if (p) {
+ q = strrchr(p, '.');
+ if (q && ((strcmp(q, ".gif") == 0) || (strcmp(q, ".wbmp") == 0) || (strcmp(q, ".bmp") == 0))) {
+ WALLPAPERUI_DBG(".gif||.wbmp||.bmp image");
+ strncpy(filename, p, MAX_LENGTH_LINE-1);
+ q = strrchr(filename, '.');
+ if (q) {
+ *q = '\0';
}
+ snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s.jpg", filename);
+ } else {
+ WALLPAPERUI_DBG("other image");
+ snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
+ }
+ WALLPAPERUI_DBG("filepath = %s", filepath);
+ if (ad->preview_image_type == WALLPAPER_TYPE_GALLERY){
+ wallpaper_ui_service_copy_wallpaper_file(ad->saved_img_path[i], filepath);
+ }
+ if (state_data.from[index]!=NULL) {
+ free(state_data.from[index]);
+ state_data.from[index]=NULL;
+ }
+ state_data.from[index] = strdup(ad->saved_img_path[i]);
- from[index] = strdup(lock_path[i]);
+ if (state_data.to[index]!=NULL) {
+ free(state_data.to[index]);
+ state_data.to[index]=NULL;
+ }
+ state_data.to[index] = strdup(filepath);
+ index++;
- if(to[index]!=NULL)
- {
- free(to[index]);
- to[index]=NULL;
- }
- to[index] = strdup(filepath);
- index++;
+ if (ad->preview_image_type == WALLPAPER_TYPE_GALLERY){
+ WALLPAPERUI_DBG("Gallery image");
temp_path[i] = strdup(filepath);
- if(flag == true) {
- if(flag_lock_from_default || flag_lock_from_cp){
- set_lock_wallpaper(filepath);
- }
- //for just edit wallpaper case
- if(strcmp(lock_path[i], filepath) == 0) {
- WALLPAPERUI_DBG("for just edit wallpaper case");
- set_lock_wallpaper(filepath);
- }
- strncpy(lockpath, filepath, MAX_LENGTH_LINE-1);
- flag = false;
- }
+ } else {
+ WALLPAPERUI_DBG("Default image");
+ temp_path[i] = strdup(ad->saved_img_path[i]);
}
- }
- i++;
- }
- wallpaper_txt_list_write(WALLPAPER_TXT_FILE, temp_path);
+ _set_wallpaper(temp_path[i]);
- i--;
- while(i >= 0 && temp_path[i]) {
- free(temp_path[i]);
- i--;
+ strncpy(ad->current_preview_img_path, temp_path[0], MAX_LENGTH_LINE-1);
+ WALLPAPERUI_DBG("current_preview_img_path %s", ad->current_preview_img_path);
+ }
}
+ i++;
}
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT, index);
-
-#if !DISABLE_CP_WALLPAPER
- if(flag_lock_changed && flag_lock_from_cp) {
- WALLPAPERUI_DBG("flag_lock_changed && flag_lock_from_cp");
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_gallery_icon_layout), "elm,state,unselected", "app");
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_default_icon_layout), "elm,state,unselected", "app");
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_cp_icon_layout), "elm,state,selected", "app");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "my_interests_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
+ _wallpaper_txt_list_write(WALLPAPER_TXT_FILE, temp_path);
- cpwallpaper_changing_TA_launch_request();
+ i--;
+ while (i >= 0 && temp_path[i]) {
+ free(temp_path[i]);
+ i--;
}
- if(flag_lock_changed && (flag_lock_from_default || flag_lock_from_gallery)) {
- int value = 0;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE,&value);
- if(value==WALLPAPER_TYPE_CP)
- {
- int error = wallpaper_service_deactivate();
- if(error != 0) {
- WALLPAPERUI_DBG("wallpaper_service_deactivate fail.");
- }
- }
- }
-#endif
-
- if(flag_home_changed) {
- if(flag_color_pallete){
- if(ecore_file_exists(COLOR_PALLETE_IMAGE_NEW) == EINA_TRUE) {
- if(ecore_file_exists(COLOR_PALLETE_IMAGE) == EINA_TRUE) {
- WALLPAPERUI_DBG("remove color_pallete_image.jpg");
- ecore_file_remove(COLOR_PALLETE_IMAGE);
- }
- WALLPAPERUI_DBG("cp color_pallete_image_new.jpg");
- ecore_file_cp(COLOR_PALLETE_IMAGE_NEW, COLOR_PALLETE_IMAGE);
- WALLPAPERUI_DBG("remove color_pallete_image_new.jpg");
- ecore_file_remove(COLOR_PALLETE_IMAGE_NEW);
- }
+ vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT, index);
- memset(home_path, 0, sizeof(home_path));
- strcpy(home_path, COLOR_PALLETE_IMAGE);
-
- set_home_wallpaper(COLOR_PALLETE_IMAGE);
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 1);
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = 1");
-
- }else{
- //copy home wallpaper
- p = strrchr(home_path, '/');
- if(p) {
- if(ad->flag_home_from_default){
- set_home_wallpaper(home_path);
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 1);
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = 1");
- }else {
- snprintf(filepath, sizeof(filepath), "/opt/usr/share/lockscreen/wallpaper_list%s", p);
- WALLPAPERUI_DBG("filepath = %s", filepath);
- if(from[index]!=NULL)
- {
- free(from[index]);
- from[index]==NULL;
- }
- from[index] = strdup(home_path);
- if(to[index]!=NULL)
- {
- free(to[index]);
- to[index]==NULL;
- }
- to[index] = strdup(filepath);
- strncpy(homepath, filepath, MAX_LENGTH_LINE-1);
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 0);
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = 0");
- }
- }
- }
+ if (state_data.flag_image_from_gallery) {
+ vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
+ WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_GALLERY");
+ } else {
+ vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_DEFAULT);
+ WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_DEFAULT");
}
- if(flag_lock_changed) {
- if(flag_lock_from_default) {
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_DEFAULLT);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_DEFAULLT");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "show_preview", "preview");
- }
- } else if(flag_lock_from_gallery) {
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_GALLERY");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "show_preview", "preview");
- }
- } else if(flag_lock_from_cp) {
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_CP);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_CP");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "hide_preview", "preview");
- }
- }
- }
+ WALLPAPERUI_DBG("from[%d] : %s", 0, state_data.from[0]);
- WALLPAPERUI_DBG("from[%d] : %s", 0, from[0]);
- if(from[0] != NULL &&
- ((flag_home_changed && !ad->flag_home_from_default)
- || (flag_lock_changed && flag_lock_from_gallery))) {
+ if (ad->preview_image_type == WALLPAPER_TYPE_GALLERY) {
WALLPAPERUI_DBG("SCALE start!");
_lockscreen_gallery_scale_job_maker(480, 800, 0);
- }else {
+ } else {
//delete unused files
- Eina_List *path_list = NULL;
+
i = 0;
memset(path, 0, sizeof(path));
- int count = wallpaper_txt_list_read(WALLPAPER_TXT_FILE, path);
- if(count > 0) {
- for(i = 0; i < count; i++) {
+ count = _wallpaper_txt_list_read(WALLPAPER_TXT_FILE, path);
+ if (count > 0) {
+ for (i = 0; i < count; i++) {
path_list = eina_list_append(path_list, path[i]);
}
}
char *value = NULL;
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
+ if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
{
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
WALLPAPERUI_DBG("value = %s", value);
- char *temp = NULL;
- char string[MAX_LENGTH_LINE] = {0};
- Eina_List *file_list = NULL;
file_list = ecore_file_ls("/opt/usr/share/lockscreen/wallpaper_list");
count = eina_list_count(file_list);
- if(count > 1) {
- for(i = 0; i < count; i++) {
+ if (count > 1) {
+ for (i = 0; i < count; i++) {
temp = (char *)eina_list_nth(file_list, i);
- if(temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
+ if (temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
snprintf(string, sizeof(string), "/opt/usr/share/lockscreen/wallpaper_list/%s", temp);
- if(strcmp(string, filepath) != 0) {
- if(eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
+ if (strcmp(string, filepath) != 0) {
+ if (eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
WALLPAPERUI_DBG("string = %s", string);
- if(strcmp(string, value) != 0) {
- if(strcmp(string, COLOR_PALLETE_IMAGE) != 0){
- if(ecore_file_remove(string) == EINA_FALSE){
- WALLPAPERUI_DBG("Remove fail");
- }
+ if (strcmp(string, value) != 0) {
+ if (ecore_file_remove(string) == EINA_FALSE){
+ WALLPAPERUI_DBG("Remove fail");
}
}
}
@@ -2590,85 +1291,62 @@ void done_to_set_wallpaper()
}
}
}
- if(file_list!=NULL)
- {
+ if (file_list!=NULL) {
eina_list_free(file_list);
}
-
- //wallpaper_destory(ad);
-
- //wallpaper_back_key_cb(ad, NULL, NULL);
-
- WALLPAPERUI_DBG("flag_home_changed = %d, flag_lock_changed = %d", flag_home_changed, flag_lock_changed);
- if(flag_home_changed && flag_lock_changed) {
- //notification_status_message_post(dgettext(PKGNAME, "IDS_ST_TPOP_HOME_AND_LOCK_SCREEN_WALLPAPER_CHANGED"));
- }else if(flag_home_changed){
- //notification_status_message_post(dgettext(PKGNAME, "IDS_ST_POP_HOME_SCREEN_WALLPAPER_CHANGED_ABB"));
- }else if(flag_lock_changed) {
- //notification_status_message_post(dgettext(PKGNAME, "IDS_ST_POP_LOCK_SCREEN_WALLPAPER_CHANGED_ABB"));
- }
}
- if(flag_home_changed)
- {
-#if !DISABLE_LOGING_WALLPAPER
- WALLPAPERUI_DBG("app loging");
- wallpaper_share_logging(USE_APP_FEATURE_SURVEY_URI, "org.tizen.wallpaper-ui-service", "CHWP",NULL, NULL);
-#endif
- }
- flag_home_changed = EINA_FALSE;
- flag_lock_changed = EINA_FALSE;
+
+ state_data.flag_changed = EINA_FALSE;
sync();
WALLPAPERUI_DBG("done_to_set_wallpaper end");
+ WALLPAPERUI_TRACE_END;
}
-void lockscreen_gallery_destroy_func()
+static void _lockscreen_gallery_destroy_func()
{
- WALLPAPERUI_DBG("FINISHING start!");
- if(strlen(homepath) > 1 && !ad->flag_home_from_default) {
- set_home_wallpaper(homepath);
- }
- if(strlen(lockpath) > 1) {
- set_lock_wallpaper(lockpath);
- }
+ WALLPAPERUI_TRACE_BEGIN;
+
//delete unused files
Eina_List *path_list = NULL;
int i = 0;
char path[6][MAX_LENGTH_LINE] = {{0}};
char filepath[MAX_LENGTH_LINE] = {0};
+ int count = 0;
+ char *value = NULL;
+ char *temp = NULL;
+ char string[MAX_LENGTH_LINE] = {0};
+ Eina_List *file_list = NULL;
+
memset(path, 0, sizeof(path));
- int count = wallpaper_txt_list_read(WALLPAPER_TXT_FILE, path);
- if(count > 0) {
- for(i = 0; i < count; i++) {
+ count = _wallpaper_txt_list_read(WALLPAPER_TXT_FILE, path);
+
+ if (count > 0) {
+ for (i = 0; i < count; i++) {
path_list = eina_list_append(path_list, path[i]);
}
}
- char *value = NULL;
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
WALLPAPERUI_DBG("value = %s", value);
- char *temp = NULL;
- char string[MAX_LENGTH_LINE] = {0};
- Eina_List *file_list = NULL;
file_list = ecore_file_ls("/opt/usr/share/lockscreen/wallpaper_list");
count = eina_list_count(file_list);
- if(count > 1) {
- for(i = 0; i < count; i++) {
+ if (count > 1) {
+ for (i = 0; i < count; i++) {
temp = (char *)eina_list_nth(file_list, i);
- if(temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
+ if (temp != NULL && strcmp(temp, "lockscreen_selected_images.txt") != 0) {
snprintf(string, sizeof(string), "/opt/usr/share/lockscreen/wallpaper_list/%s", temp);
- if(strcmp(string, filepath) != 0) {
- if(eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
+ if (strcmp(string, filepath) != 0) {
+ if (eina_list_search_unsorted(path_list, _compare_cb, string) == NULL) {
WALLPAPERUI_DBG("string = %s", string);
WALLPAPERUI_DBG("value = %s", value);
- if(strcmp(string, value) != 0){
+ if (strcmp(string, value) != 0) {
WALLPAPERUI_DBG("Remove string = %s", string);
- if(ecore_file_remove(string) == EINA_FALSE){
+ if (ecore_file_remove(string) == EINA_FALSE) {
WALLPAPERUI_DBG("Remove fail");
}
}
@@ -2678,706 +1356,318 @@ void lockscreen_gallery_destroy_func()
}
}
- if(file_list!=NULL)
- {
+ if (file_list!=NULL) {
eina_list_free(file_list);
}
- //wallpaper_destory(ad);
+ //_wallpaper_destroy(ad);
- WALLPAPERUI_DBG("flag_home_changed = %d, flag_lock_changed = %d", flag_home_changed, flag_lock_changed);
- if(flag_home_changed && flag_lock_changed) {
- //notification_status_message_post(dgettext(PKGNAME, "IDS_ST_TPOP_HOME_AND_LOCK_SCREEN_WALLPAPER_CHANGED"));
- }else if(flag_home_changed){
- //notification_status_message_post(dgettext(PKGNAME, "IDS_ST_POP_HOME_SCREEN_WALLPAPER_CHANGED_ABB"));
- }else if(flag_lock_changed) {
- //notification_status_message_post(dgettext(PKGNAME, "IDS_ST_POP_LOCK_SCREEN_WALLPAPER_CHANGED_ABB"));
- }
sync();
scale_resize_state = 0;
//wallpaper_back_key_cb(ad, NULL, NULL);
+ WALLPAPERUI_TRACE_END;
}
-void wallpaper_destory(void *data)
+static void _wallpaper_destroy(void *data)
{
WALLPAPERUI_TRACE_BEGIN
ret_if(!data);
- if(ecore_file_exists(COLOR_PALLETE_IMAGE_NEW) == EINA_TRUE) {
- WALLPAPERUI_DBG("remove color_pallete_image_new.jpg");
- ecore_file_remove(COLOR_PALLETE_IMAGE_NEW);
- }
-
- if(!flag_color_pallete){
- if(ecore_file_exists(COLOR_PALLETE_IMAGE) == EINA_TRUE) {
- WALLPAPERUI_DBG("remove color_pallete_image.jpg");
- ecore_file_remove(COLOR_PALLETE_IMAGE);
- }
- }
-
-#if !DISABLE_CP_WALLPAPER
- if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }
- //remove galley newly add from gallery file
- Node* pTemp = head;
- while (pTemp != NULL)
- {
- if(NULL != pTemp->add_gallery_path)
- {
- WALLPAPERUI_DBG("wallpaper_destory pTemp->add_gallery_path = %s",pTemp->add_gallery_path);
- if(ecore_file_remove(pTemp->add_gallery_path) == EINA_FALSE)
- {
- WALLPAPERUI_DBG("wallpaper_destory pTemp->add_gallery_path = %s",pTemp->add_gallery_path);
- }
- }
- pTemp = pTemp->pNext;
- }
- //destory gallery newly added list
- destroyNodeList();
- Eina_List *file_list = NULL;
- int count = 0;
- int i = 0;
- char *temp = NULL;
- file_list = ecore_file_ls("/opt/usr/media/Images");
- count = eina_list_count(file_list);
- if(count >= 1)
- {
- for(i = 0; i < count; i++)
- {
- temp = (char *)eina_list_nth(file_list, i);
- if(NULL != temp && NULL != strstr(temp,".raw"))
- {
- WALLPAPERUI_DBG("temp = %s",temp);
- char *path = (char *)malloc(strlen("/opt/usr/media/Images") + strlen(temp)+ 1);
- if(path) {
- sprintf(path, "%s/%s", "/opt/usr/media/Images", temp);
- WALLPAPERUI_DBG(" path = %s",path);
- if(ecore_file_remove(path) == EINA_FALSE)
- {
- WALLPAPERUI_DBG("fail path = %s ",path);
- }
- if(NULL != path)
- {
- WALLPAPERUI_DBG("free path");
- free(path);
- }
- }
- }
- }
- }
- if(file_list!=NULL)
- {
- eina_list_free(file_list);
- }
-#endif
-
wallpaper_ui_service_appdata *ad = data;
+ if (ad->last_preview_img_path != NULL) {
+ WALLPAPERUI_ERR("free last_preview_img_path");
+ free(ad->last_preview_img_path);
+ }
if (ad->win) {
evas_object_del(ad->win);
ad->win = NULL;
}
+
+ elm_theme_extension_del(NULL, EDJDIR"/button_customized_theme.edj");
+
elm_exit();
WALLPAPERUI_TRACE_END
}
-static void wallpaper_back_key_cb(void *data, Evas_Object *obj, void *event_info)
+static void _wallpaper_back_key_cb(void *data, Evas_Object *obj, void *event_info)
{
WALLPAPERUI_TRACE_BEGIN;
- ret_if(!data);
+ ret_if (!data);
- if(flag_edit_click){
- WALLPAPERUI_ERR("is launching image view service");
- return;
- }
+ wallpaper_ui_service_appdata *ad = data;
+ Elm_Object_Item *item = NULL;
- if(scale_resize_state==1)
- {
+ if (scale_resize_state == 1) {
WALLPAPERUI_ERR("image_resizeing ignore");
return;
}
-#if !DISABLE_CP_WALLPAPER
- if(cp_wallpaper_list!=NULL)
- {
- cp_info_list_free(cp_wallpaper_list);
- cp_wallpaper_list = NULL;
- }
-#endif
- wallpaper_ui_service_appdata *ad = data;
- Elm_Object_Item *item = elm_naviframe_top_item_get(ad->navi_bar);
- if(item && (item == nf_it)) {
- wallpaper_destory(ad);
+ item = elm_naviframe_top_item_get(ad->navi_bar);
+ if (item && (item == nf_it)) {
+ _wallpaper_destroy(ad);
} else if (item == NULL) {
WALLPAPERUI_ERR("item == NULL : destroy UG");
- wallpaper_destory(ad);
+ _wallpaper_destroy(ad);
} else {
WALLPAPERUI_ERR("item != nf_it");
- flag_main = EINA_TRUE;
- flag_sel = EINA_FALSE;
- ad->default_nf_it = NULL;
elm_naviframe_item_pop(ad->navi_bar);
}
WALLPAPERUI_TRACE_END;
}
-static void wallpaper_db_update_cb(media_content_error_e error, int pid,
+static void _wallpaper_db_update_cb(media_content_error_e error, int pid,
media_content_db_update_item_type_e update_item,
media_content_db_update_type_e update_type,
media_content_type_e media_type, char *uuid,
char *path, char *mime_type, void *data)
{
- WALLPAPERUI_DBG("update_item[%d], update_type[%d], media_type[%d]", update_item,
- update_type, media_type);
+ WALLPAPERUI_TRACE_BEGIN;
+ WALLPAPERUI_DBG("update_item[%d], update_type[%d], media_type[%d]", update_item, update_type, media_type);
+
+ wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
+ char* last_image = NULL;
- if(media_type != MEDIA_CONTENT_TYPE_IMAGE) {
+ if (media_type != MEDIA_CONTENT_TYPE_IMAGE) {
WALLPAPERUI_DBG("Not Image update");
//return;
}
- wallpaper_ui_service_appdata *ad= (wallpaper_ui_service_appdata *)data;
-
if (MEDIA_CONTENT_ERROR_NONE != error) {
- WALLPAPERUI_ERR("Update db error[%d]!", error);
- return;
+ WALLPAPERUI_ERR("Update db error[%d]!", error);
+ return;
}
- char* last_image = get_last_image_from_db();
+ last_image = _get_last_image_from_db();
WALLPAPERUI_DBG("last_image == %s", last_image);
- if(last_image != NULL) {
- elm_image_file_set(ad->home_gallery_icon, last_image, NULL);
- elm_image_file_set(ad->lock_gallery_icon, last_image, NULL);
- Evas_Object *layout = elm_object_part_content_unset(ad->home_gallery_icon_layout, "effect");
- evas_object_hide(layout);
- layout = elm_object_part_content_unset(ad->lock_gallery_icon_layout, "effect");
- evas_object_hide(layout);
+
+ if (last_image != NULL) {
+ elm_image_file_set(ad->preview_image, last_image, NULL);
free(last_image);
last_image = NULL;
- }else {
- elm_image_file_set(ad->home_gallery_icon, ICONDIR"/no_gallery_bg.png", NULL);
- elm_image_file_set(ad->lock_gallery_icon, ICONDIR"/no_gallery_bg.png", NULL);
+ } else {
+ elm_image_file_set(ad->preview_image, ICONDIR"/no_gallery_bg.png", NULL);
}
+ evas_object_show(ad->preview_image);
- evas_object_show(ad->home_gallery_icon);
- evas_object_show(ad->lock_gallery_icon);
+ WALLPAPERUI_TRACE_END;
+}
- Eina_Bool flag_delete_all = EINA_TRUE;
- if(flag_main) {
- WALLPAPERUI_DBG("home wallpaper");
- if(ecore_file_exists(home_path)==EINA_FALSE)
- {
- WALLPAPERUI_ERR("%s is deleted", home_path);
- ad->flag_home_from_default = EINA_TRUE;
- memset(home_path, 0, sizeof(home_path));
- strcpy(home_path, HOME_SETTING_DEFAULT_PATH);
- elm_image_file_set(bg_home_icon, ICONDIR"/default_bg.png", NULL);
- evas_object_show(bg_home_icon);
- }
- WALLPAPERUI_DBG("lock wallpaper");
- int i = 0;
- flag_delete_all = EINA_TRUE;
- while(i < MAX_MULTIPLE_SELECTION && lock_path[i][0] != '\0') {
- if(ecore_file_exists(lock_path[i])==EINA_FALSE)
- {
- WALLPAPERUI_ERR("%s is deleted", lock_path[i]);
- memset(lock_path[i], 0, sizeof(lock_path[i]));
- } else {
- WALLPAPERUI_ERR("%s exist", lock_path[i]);
- flag_delete_all = EINA_FALSE;
- elm_image_file_set(bg_lock_icon, lock_path[i], NULL);
- evas_object_show(bg_lock_icon);
- }
- i++;
- }
+static void _main_preview_image_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+ WALLPAPERUI_TRACE_BEGIN;
- if(flag_delete_all == EINA_TRUE) {
- flag_lock_from_default = EINA_TRUE;
- flag_lock_from_gallery = EINA_FALSE;
- flag_lock_from_cp = EINA_FALSE;
- strcpy(lock_path[0], LOCK_SETTING_DEFAULT_PATH);
- elm_image_file_set(bg_lock_icon, ICONDIR"/default_bg.png", NULL);
- evas_object_show(bg_lock_icon);
- }
- } else {
- if(flag_home) {
- WALLPAPERUI_DBG("!flag_main || flag_home");
- if(ecore_file_exists(home_path)==EINA_FALSE)
- {
- WALLPAPERUI_ERR("%s is deleted", home_path);
- memset(home_path, 0, sizeof(home_path));
- //set home icon in main
- elm_image_file_set(bg_home_icon, ICONDIR"/default_bg.png", NULL);
- evas_object_show(bg_home_icon);
- //set preview iamge
- char *value = NULL;
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_get_value_string() failed");
- }
- strncpy(home_path, value, MAX_LENGTH_LINE-1);
- WALLPAPERUI_DBG("home_path = %s", home_path);
- elm_image_file_set(preview_image, home_path, NULL);
- evas_object_show(preview_image);
- }
- } else {
- WALLPAPERUI_DBG("!flag_main || !flag_home");
- int i = 0;
- flag_delete_all = EINA_TRUE;
- Elm_Object_Item *it = NULL;
- Thumbnail *item_data = NULL;
- while(i < MAX_MULTIPLE_SELECTION && lock_path[i][0] != '\0') {
- if(ecore_file_exists(lock_path[i])==EINA_FALSE)
- {
- WALLPAPERUI_ERR("%s is deleted", lock_path[i]);
- //delete gengrid item
- it = elm_gengrid_first_item_get(gengrid);
- while(it) {
- item_data = (Thumbnail *)elm_object_item_data_get(it);
- if(item_data && strcmp(item_data->path, lock_path[i])==0) {
- WALLPAPERUI_DBG("path=%s", item_data->path);
- WALLPAPERUI_DBG("this item is deleted");
- elm_object_item_del(it);
- break;
- }
- it = elm_gengrid_item_next_get(it);
- }
- memset(lock_path[i], 0, sizeof(lock_path[i]));
- } else if(flag_delete_all == EINA_TRUE){
- WALLPAPERUI_ERR("%s exist", lock_path[i]);
- flag_delete_all = EINA_FALSE;
- //set lock icon
- //elm_image_file_set(bg_lock_icon, lock_path[i], NULL);
- //evas_object_show(bg_lock_icon);
- //set preview image
- elm_image_file_set(preview_image, lock_path[i], NULL);
- evas_object_show(preview_image);
- //set the first gengrid item selected
- it = elm_gengrid_first_item_get(gengrid);
- while(it) {
- item_data = (Thumbnail *)elm_object_item_data_get(it);
- if(item_data && strcmp(item_data->path, lock_path[i])==0) {
- WALLPAPERUI_DBG("this item is selected");
- edje_object_signal_emit(elm_layout_edje_get(item_data->content), "elm,state,selected", "app");
- item_data->bSelected = EINA_TRUE;
- current_index = item_data->index;
- break;
- }
- it = elm_gengrid_item_next_get(it);
- }
- }
- i++;
- }
- if(flag_delete_all == EINA_TRUE) {
- //set preview image
- char *value = NULL;
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_get_value_string() failed");
- }
- memset(lock_path[0], 0, sizeof(lock_path[0]));
- strncpy(lock_path[0], value, sizeof(lock_path[0])-1);
- WALLPAPERUI_DBG("lock_path[0] = %s", lock_path[0]);
- //set lock icon
- //elm_image_file_set(bg_lock_icon, lock_path[0], NULL);
- //evas_object_show(bg_lock_icon);
- //set preview image
- elm_image_file_set(preview_image, lock_path[0], NULL);
- evas_object_show(preview_image);
- }
- }
+ Evas_Object *navi_bar = (Evas_Object *)data;
+ if(navi_bar == NULL) {
+ WALLPAPERUI_DBG("navi_bar == NULL");
+ return;
}
+
+ feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
+ wallpaper_preview_main();
+
+ WALLPAPERUI_TRACE_END;
}
-void wallpaper_main_create_view(void *data)
+void wallpaper_preview_main()
{
- WALLPAPERUI_DBG("lockscreen_options_create_wallpaper_view begin");
+ WALLPAPERUI_TRACE_BEGIN;
- flag_main = EINA_TRUE;
+ Evas_Object *preveiw_main_layout = NULL;
+ Evas_Object *preview_image = NULL;
- vconf_get_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, &flag_home_pre_wallpaper_from_default);
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &enum_lock_pre_wallpaper_from_default);
+ preveiw_main_layout = elm_layout_add(ad->navi_bar);
+ elm_layout_file_set(preveiw_main_layout, EDJDIR"/popup-wallpaper.edj", "wallpaper.preview");
+ evas_object_size_hint_weight_set(preveiw_main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- ad = (wallpaper_ui_service_appdata *)data;
- if(ad== NULL){
- WALLPAPERUI_DBG("wallpaper_ui_service_appdata is NULL");
- return;
- }
- if(ad->win == NULL){
- WALLPAPERUI_DBG("ad->win is NULL");
- return;
- }
+ preview_image = elm_image_add(preveiw_main_layout);
+
+ WALLPAPERUI_DBG("current_preview_img_path = %s", ad->current_preview_img_path);
- ad->flag_home_from_default = EINA_FALSE;
+ elm_image_file_set(preview_image, ad->current_preview_img_path, NULL);
+ elm_image_aspect_fixed_set(preview_image, EINA_TRUE);
+ elm_image_fill_outside_set(preview_image, EINA_TRUE);
+ elm_image_preload_disabled_set(preview_image, EINA_TRUE);
+ elm_object_part_content_set(preveiw_main_layout, "preview", preview_image);
+ edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "preview_clicked", "edj", _preview_clicked_cb, (void *)ad);
+ elm_object_part_content_unset(preveiw_main_layout, "thumblist");
+ evas_object_show(preveiw_main_layout);
+ Elm_Object_Item *navi_item = elm_naviframe_item_push(ad->navi_bar, NULL, NULL, NULL, preveiw_main_layout, NULL);
+ elm_naviframe_item_title_visible_set(navi_item, EINA_FALSE);
+
+ WALLPAPERUI_TRACE_END;
+}
+
+
+HAPI void wallpaper_main_create_view(void *data)
+{
+ WALLPAPERUI_TRACE_BEGIN;
+ int i = 0;
+ int count = 0;
+ char *value = NULL;
char* from = NULL;
- app_control_get_extra_data(ad->service, EXTRA_FROM_KEY, &from);
- WALLPAPERUI_ERR("from %s",from);
- flag_home = EINA_FALSE;
+ state_data.flag_edit_click = EINA_FALSE;
+ state_data.flag_changed = EINA_FALSE;
- page_data_s *pd = calloc(1, sizeof(page_data_s));
- if(pd == NULL) {
- WALLPAPERUI_ERR("calloc failed");
+ ad = (wallpaper_ui_service_appdata *)data;
+ if (ad == NULL) {
+ WALLPAPERUI_DBG("wallpaper_ui_service_appdata is NULL");
return;
}
- ad->pd = pd;
+ if (ad->win == NULL) {
+ WALLPAPERUI_DBG("ad->win is NULL");
+ return;
+ }
//create txt list file
- wallpaper_txt_list_create(WALLPAPER_TXT_FILE);
+ _wallpaper_txt_list_create(WALLPAPER_TXT_FILE);
//initialize lock_path and home_path
- memset(lock_path, 0, sizeof(lock_path));
- int count = wallpaper_txt_list_read(WALLPAPER_TXT_FILE, lock_path);
- int i = 0;
- for(i=0; i<count; i++)
- WALLPAPERUI_DBG("lock_path[%d] = %s", i, lock_path[i]);
+ memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
+ count = _wallpaper_txt_list_read(WALLPAPER_TXT_FILE, ad->saved_img_path);
- char *value = NULL;
+ for (i=0; i<count; i++) {
+ WALLPAPERUI_DBG("ad->saved_img_path[%d] = %s", i, ad->saved_img_path[i]);
+ }
- if(count==0)
- {
+ if (count == 0) {
WALLPAPERUI_DBG("count == 0");
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
- memset(lock_path[0], 0, sizeof(lock_path[0]));
- strncpy(lock_path[0], value, sizeof(lock_path[0])-1);
- WALLPAPERUI_DBG("lock_path[0] = %s", lock_path[0]);
- }
+ memset(ad->saved_img_path[0], 0, sizeof(ad->saved_img_path[0]));
+ strncpy(ad->saved_img_path[0], value, sizeof(ad->saved_img_path[0])-1);
- int vconf = -1;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &vconf);
- if(vconf == WALLPAPER_TYPE_CP) {
- memset(lock_path, 0, sizeof(lock_path));
- strncpy(lock_path[0], DEFAULT_INTEREST_PATH, sizeof(lock_path[0])-1);
+ WALLPAPERUI_DBG("ad->saved_img_path[0] = %s", ad->saved_img_path[0]);
}
-
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_get_value_string() failed");
- }
- strncpy(home_path, value, sizeof(home_path)-1);
- if(!strcmp(home_path, COLOR_PALLETE_IMAGE)){
- flag_color_pallete = EINA_TRUE;
- flag_pre_color_pallete = EINA_TRUE;
- }
- WALLPAPERUI_DBG("home_path = %s", home_path);
-
- if (media_content_set_db_updated_cb(wallpaper_db_update_cb, data) != MEDIA_CONTENT_ERROR_NONE) {
+ if (media_content_set_db_updated_cb(_wallpaper_db_update_cb, data) != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_DBG("Set db updated cb failed!");
}
- //Navigation bar
+ /* Naviframe */
Evas_Object *navi_bar = elm_naviframe_add(ad->layout);
- elm_object_part_content_set(ad->layout, "elm.swallow.content", navi_bar );
+ elm_object_part_content_set(ad->layout, "elm.swallow.content", navi_bar);
evas_object_show(navi_bar);
ad->navi_bar = navi_bar;
- Evas_Object *main_layout = elm_layout_add(navi_bar);
- elm_layout_file_set(main_layout, EDJDIR"/popup-wallpaper.edj", "pagecontrol_layout");
- evas_object_size_hint_weight_set(main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(main_layout);
-
- /*homescreen icon*/
- Evas_Object *home_icon_layout = elm_layout_add(main_layout);
- elm_layout_file_set(home_icon_layout, EDJDIR"/popup-wallpaper.edj", "home_icon");
- evas_object_size_hint_weight_set(home_icon_layout, 0, 0);
- evas_object_size_hint_align_set(home_icon_layout, 0, EVAS_HINT_FILL);
- elm_object_part_content_set(main_layout, "page_home_icon", home_icon_layout);
- evas_object_show(home_icon_layout);
- edje_object_signal_callback_add(_EDJ(main_layout), "cliper1_clicked", "edj", upper_home_icon_click_cb, pd);
-
- /*lockscreen icon*/
- Evas_Object *lockscreen_icon_layout = elm_layout_add(main_layout);
- elm_layout_file_set(lockscreen_icon_layout, EDJDIR"/popup-wallpaper.edj", "lockscreen_icon");
- evas_object_size_hint_weight_set(lockscreen_icon_layout, 0, 0);
- evas_object_size_hint_align_set(lockscreen_icon_layout, 0, EVAS_HINT_FILL);
- elm_object_signal_emit(lockscreen_icon_layout, "home_page", "elm");
- elm_object_part_content_set(main_layout, "page_lockscreen_icon", lockscreen_icon_layout);
- evas_object_show(lockscreen_icon_layout);
-
- edje_object_signal_callback_add(_EDJ(main_layout), "cliper2_clicked", "edj", upper_lock_icon_click_cb, pd);
- elm_object_translatable_part_text_set(main_layout, "text_home", APP_STRING("IDS_LCKSCN_BUTTON_HOME_SCREEN_ABB"));
- elm_object_translatable_part_text_set(main_layout, "text_lock", APP_STRING("IDS_LCKSCN_BUTTON_LOCK_SCREEN_ABB2"));
- edje_object_signal_emit(elm_layout_edje_get(main_layout), "text_lock_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(main_layout), "lock_bar_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(main_layout), "lock_bar_ef_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(main_layout), "text_home_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(main_layout), "home_bar_dim", "elm");
- edje_object_signal_emit(elm_layout_edje_get(main_layout), "home_bar_ef_dim", "elm");
-
- pd->home_icon = home_icon_layout;
- pd->lockscreen_icon = lockscreen_icon_layout;
- pd->main_layout = main_layout;
-
- evas_object_event_callback_add(main_layout, EVAS_CALLBACK_RESIZE, layout_resize_cb, pd);
- ad->main_layout = main_layout;
-
- /* Create Scroller */
- Evas_Object *scroller = elm_scroller_add(main_layout);
- elm_scroller_loop_set(scroller, EINA_FALSE, EINA_FALSE);
- evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_page_relative_set(scroller, 1.0, 0.0);
- elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- elm_scroller_page_scroll_limit_set(scroller, 1, 0);
- elm_object_scroll_lock_y_set(scroller, EINA_TRUE);
- elm_object_part_content_set(main_layout, "scroller", scroller);
- evas_object_smart_callback_add(scroller, "scroll", scroller_scroll_cb, pd);
-
- pd->scroller = scroller;
-
- /* Create Box */
- Evas_Object *box = elm_box_add(scroller);
- elm_box_horizontal_set(box, EINA_TRUE);
- elm_object_content_set(scroller, box);
- evas_object_show(box);
- ad->box = box;
-
- /* Create Pages */
- /* page lockscreen layout */
- Evas_Object *page_lockscreen_layout = elm_layout_add(box);
- evas_object_size_hint_weight_set(page_lockscreen_layout, 0, 0);
- evas_object_size_hint_align_set(page_lockscreen_layout, 0, EVAS_HINT_FILL);
- elm_layout_file_set(page_lockscreen_layout, EDJDIR"/popup-wallpaper.edj", "pagecontrol_page_layout");
- evas_object_show(page_lockscreen_layout);
-
- /* page lockscreen content */
- Evas_Object *lockscreen_page = elm_layout_add(page_lockscreen_layout);
- elm_layout_file_set(lockscreen_page, EDJDIR"/popup-wallpaper.edj", "wallpaper_page_lock_layout");
- //elm_layout_file_set(lockscreen_page, EDJDIR"/popup-wallpaper.edj", "wallpaper_page_layout");
- evas_object_size_hint_weight_set(lockscreen_page, 0, 0);
- evas_object_size_hint_align_set(lockscreen_page, 0, EVAS_HINT_FILL);
- evas_object_show(lockscreen_page);
-
- /*page home bg image*/
- bg_lock_icon = elm_image_add(lockscreen_page);
- if(ecore_file_exists(lock_path[0])==EINA_TRUE){
- elm_image_file_set(bg_lock_icon, lock_path[0], NULL);
- }else{
- elm_image_file_set(bg_lock_icon, ICONDIR"/default_bg.png", NULL);
- }
-
- elm_image_aspect_fixed_set(bg_lock_icon, EINA_TRUE);
- elm_image_fill_outside_set(bg_lock_icon, EINA_TRUE);
- elm_image_preload_disabled_set(bg_lock_icon, EINA_FALSE);
- edje_object_signal_callback_add(_EDJ(lockscreen_page), "page_clicked", "edj", page_clicked_cb, (void *)ad);
- elm_object_part_content_set(lockscreen_page, "bg_image", bg_lock_icon);
- evas_object_show(bg_lock_icon);
-
- /*int v_count = -1;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT, &v_count);
- char help_text[256] = {0};
- if(v_count > 1) {
- if(vconf == WALLPAPER_TYPE_CP) {
- snprintf(help_text, sizeof(help_text), APP_STRING("%d categories selected"), v_count);
- } else {
- snprintf(help_text, sizeof(help_text), APP_STRING("%d images selected"), v_count);
- }
- elm_object_translatable_part_text_set(lockscreen_page, "text_help", help_text);
- }*/
-
-
- elm_object_translatable_part_text_set(lockscreen_page, "text_tap", APP_STRING("IDS_LCKSCN_NPBODY_TAP_TO_PREVIEW"));
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &vconf);
- if(vconf == WALLPAPER_TYPE_CP) {
- elm_object_signal_emit(lockscreen_page, "hide_preview", "preview");
- } else {
- elm_object_signal_emit(lockscreen_page, "show_preview", "preview");
- }
-
-
- pd->page[0] = lockscreen_page;
- elm_object_part_content_set(page_lockscreen_layout, "page", lockscreen_page);
- elm_box_pack_end(box, page_lockscreen_layout);
-
- last_image = get_last_image_from_db();
- WALLPAPERUI_DBG("last_image == %s", last_image);
-
- /* page default & gallery icon*/
- make_default_and_gallery_icon(lockscreen_page, data, 1);
-
-#if !DISABLE_CP_WALLPAPER
- make_my_interests_icon(lockscreen_page);
-#endif
-
-
- /* page home layout */
- Evas_Object *page_home_layout = elm_layout_add(box);
- elm_layout_file_set(page_home_layout, EDJDIR"/popup-wallpaper.edj", "pagecontrol_page_layout");
- evas_object_size_hint_weight_set(page_home_layout, 0, 0);
- evas_object_size_hint_align_set(page_home_layout, 0, EVAS_HINT_FILL);
- evas_object_show(page_home_layout);
-
- /* page home content */
- Evas_Object *home_page = elm_layout_add(page_home_layout);
- elm_layout_file_set(home_page, EDJDIR"/popup-wallpaper.edj", "wallpaper_page_layout");
- evas_object_size_hint_weight_set(home_page, 0, 0);
- evas_object_size_hint_align_set(home_page, 0, EVAS_HINT_FILL);
- evas_object_show(page_home_layout);
-
- /*page home bg image*/
- bg_home_icon = elm_image_add(home_page);
- if(ecore_file_exists(home_path)==EINA_TRUE){
- elm_image_file_set(bg_home_icon, home_path, NULL);
- }else {
- elm_image_file_set(bg_home_icon, ICONDIR"/default_bg.png", NULL);
- }
- elm_image_aspect_fixed_set(bg_home_icon, EINA_TRUE);
- elm_image_fill_outside_set(bg_home_icon, EINA_TRUE);
- elm_image_preload_disabled_set(bg_home_icon, EINA_FALSE);
- edje_object_signal_callback_add(_EDJ(home_page), "page_clicked", "edj", page_clicked_cb, (void *)ad);
- elm_object_part_content_set(home_page, "bg_image", bg_home_icon);
- evas_object_show(bg_home_icon);
-
- elm_object_translatable_part_text_set(home_page, "text_tap", APP_STRING("IDS_LCKSCN_NPBODY_TAP_TO_PREVIEW"));
-
- /*page home & lockscreen icon*/
- //make_home_and_lockscreen_icon(main_layout, 0);
-
- pd->page[1] = home_page;
- elm_object_part_content_set(page_home_layout, "page", home_page);
- elm_box_pack_end(box, page_home_layout);
+ /* layout */
+ Evas_Object *preveiw_main_layout = elm_layout_add(ad->navi_bar);
+ elm_layout_file_set(preveiw_main_layout, EDJDIR"/popup-wallpaper.edj", "main_page_layout");
+ evas_object_size_hint_weight_set(preveiw_main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(preveiw_main_layout);
+ ad->main_layout = preveiw_main_layout;
+
+ /* preview image */
+ Evas_Object *image = elm_image_add(preveiw_main_layout);
+ elm_image_file_set(image, ad->saved_img_path[0], NULL);
+ elm_image_aspect_fixed_set(image, EINA_TRUE);
+ elm_image_fill_outside_set(image, EINA_TRUE);
+ elm_image_preload_disabled_set(image, EINA_FALSE);
+ elm_object_part_content_set(preveiw_main_layout, "preview_image", image);
+ evas_object_smart_callback_add(image, "clicked", _main_preview_image_clicked_cb, ad->navi_bar);
- /* page default & gallery icon*/
- make_default_and_gallery_icon(home_page, data, 0);
+ ad->preview_image = image;
+ /* preview text */
+ elm_object_translatable_part_text_set(preveiw_main_layout, "text_tap", APP_STRING("IDS_LCKSCN_NPBODY_TAP_TO_PREVIEW"));
+// elm_object_signal_emit(preveiw_main_layout, "hide_preview", "preview_image");
- if(last_image!=NULL)
- {
- FREE(last_image);
- last_image = NULL;
+ /* gallery last image */
+ ad->last_preview_img_path = _get_last_image_from_db();
+ if (ad->last_preview_img_path != NULL) {
+ WALLPAPERUI_DBG("last_preview_img_path == %s", ad->last_preview_img_path);
}
- pd->current_page = 0;
-
- ea_object_event_callback_add(navi_bar, EA_CALLBACK_BACK, wallpaper_back_key_cb, (void*)ad);
- nf_it = elm_naviframe_item_push(navi_bar, APP_STRING("IDS_LCKSCN_MBODY_WALLPAPERS"), NULL, NULL, main_layout, NULL);
- WALLPAPERUI_ERR("main page(%p) is created", nf_it);
- ad->main_nf_it = nf_it;
-
- WALLPAPERUI_DBG("lockscreen_options_create_wallpaper_view end");
-}
-static bool OnGetImagesHandleByID(media_info_h image, void *data)
-{
- media_info_h *imageHandle = (media_info_h *)(data);
-
- media_info_clone(imageHandle, image);
-
- return false;
-}
-
-#if !DISABLE_CP_WALLPAPER
-static int GetMediaByPathWithMode(const char *mediaPath, media_info_h *media)
-{
- WALLPAPERUI_DBG("get_last_image_from_db Begin");
+ /* thumnail icon */
+ ad->gengrid = main_gengrid_add(preveiw_main_layout, NULL);
+ elm_object_part_content_set(preveiw_main_layout, "thumblist", ad->gengrid);
+ evas_object_show(ad->gengrid);
- //int ret = MEDIA_CONTENT_ERROR_NONE;
- filter_handle media_filter = NULL;
+ eext_object_event_callback_add(navi_bar, EEXT_CALLBACK_BACK, _wallpaper_back_key_cb, (void*)ad);
+ nf_it = elm_naviframe_item_push(navi_bar, APP_STRING("IDS_LCKSCN_MBODY_WALLPAPERS"), NULL , NULL, preveiw_main_layout, NULL);
- char buf[3072] = {0,};
- snprintf(buf, sizeof(buf), "((MEDIA_TYPE=0 OR MEDIA_TYPE=1) AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND (MEDIA_PATH =\"%s\"))",mediaPath);
+ elm_object_translatable_part_text_set(preveiw_main_layout, "elm.text.title", APP_STRING("IDS_LCKSCN_MBODY_WALLPAPERS"));
+ elm_object_signal_emit(navi_bar, "elm,state,title,hide", "elm");
- filter_h filter = NULL;
- media_filter_create(&filter);
- media_filter_set_condition(filter,buf, MEDIA_CONTENT_COLLATE_NOCASE);
+ /* Title Cancel Button */
+ Evas_Object *cancel_btn = elm_button_add(preveiw_main_layout);
+ elm_object_style_set(cancel_btn, "naviframe/back_btn/custom");
+ evas_object_smart_callback_add(cancel_btn, "clicked", _main_cancel_button_cb, NULL);
+ elm_object_part_content_set(preveiw_main_layout, "title_left_btn", cancel_btn);
+ evas_object_show(cancel_btn);
+ elm_object_signal_emit(preveiw_main_layout, "elm,state,title_left_btn,show", "elm");
- int ret = media_info_foreach_media_from_db_with_media_mode(filter, OnGetImagesHandleByID, media);
- media_filter_destroy(filter);
+ /* Title Done Button */
+ Evas_Object *done_btn = elm_button_add(preveiw_main_layout);
+ elm_object_style_set(done_btn, "naviframe/title_right_custom");
+ evas_object_smart_callback_add(done_btn, "clicked", _main_done_button_cb, NULL);
+ elm_object_translatable_part_text_set(done_btn, "elm.text", APP_STRING("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
+ elm_object_part_content_set(preveiw_main_layout, "title_right_btn", done_btn);
+ evas_object_show(done_btn);
+ elm_object_signal_emit(preveiw_main_layout, "elm,state,title_right_btn,show", "elm");
- return ret;
+ WALLPAPERUI_TRACE_END;
}
-#endif
-static Evas_Object *preview_create_edje_content(Evas_Object *parent, const char *path,Thumbnail *thm)
+static Evas_Object *_preview_create_edje_content(Evas_Object *parent, const char *path,Thumbnail *thm)
{
WALLPAPERUI_TRACE_BEGIN;
WALLPAPERUI_DBG("path=%s", path);
-
Evas_Object *layout;
+
layout = elm_layout_add(parent);
- if(elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "preview_gengrid.item") == EINA_FALSE)
- {
+ if (elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "preview_gengrid.item") == EINA_FALSE) {
WALLPAPERUI_DBG("Cannot load mutiple-wallpaper edj");
return NULL;
}
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
evas_object_show(layout);
- char *thumbnailPath = NULL;
-#if !DISABLE_CP_WALLPAPER
- if(flag_lock_from_gallery) {
- media_info_h media_h = NULL;
- int ret = -1;
- //char* thumbnailPath = NULL;
- ret = GetMediaByPathWithMode(path,&media_h);
- if (ret != MEDIA_CONTENT_ERROR_NONE || !media_h)
- {
- if (media_h)
- {
- media_info_destroy(media_h);
- }
- WALLPAPERUI_DBG("GetMediaByPathWithMode media_h fail");
- }else {
- if (media_info_get_thumbnail_path(media_h, &thumbnailPath) != MEDIA_CONTENT_ERROR_NONE) {
- WALLPAPERUI_ERR("Get media type failed!");
- }
-
- WALLPAPERUI_DBG("thumbnailPath is %s", thumbnailPath);
- free(media_h);
- }
- }
-#endif
-
Evas_Object *image = elm_image_add(layout);
elm_object_part_content_set(layout, "item", image);
-#if !DISABLE_CP_WALLPAPER
- if(thumbnailPath && flag_lock_from_gallery) {
- elm_image_file_set(image, thumbnailPath, NULL);
- } else {
- elm_image_file_set(image, path, NULL);
- }
-#else
elm_image_file_set(image, path, NULL);
-#endif
+
elm_image_aspect_fixed_set(image, EINA_TRUE);
elm_image_fill_outside_set(image, EINA_TRUE);
- elm_image_preload_disabled_set(image, EINA_TRUE);
+ elm_image_preload_disabled_set(image, EINA_FALSE);
evas_object_show(image);
+ if (thm->title) {
+ elm_object_translatable_part_text_set(layout, "text", thm->title);
+ }
+
+ WALLPAPERUI_TRACE_END;
return layout;
}
-static Evas_Object *
-preview_grid_content_get(void *data, Evas_Object *obj, const char *part)
+static Evas_Object *_preview_grid_content_get(void *data, Evas_Object *obj, const char *part)
{
+ WALLPAPERUI_TRACE_BEGIN;
Thumbnail *thm = (Thumbnail *)data;
WALLPAPERUI_DBG("preview_grid_content_get Content get : %s", part);
- if (!strcmp(part, "elm.swallow.icon"))
- {
- Evas_Object *contents = preview_create_edje_content(obj, (thm->path),thm);
+
+ if (!strcmp(part, "elm.swallow.icon")) {
+ Evas_Object *contents = _preview_create_edje_content(obj, (thm->path),thm);
thm->content = contents;
- WALLPAPERUI_DBG("path=%s", thm->path);
- if(thm->bSelected)
- {
+ WALLPAPERUI_DBG(">>path=%s", thm->path);
+
+ if (thm->bSelected) {
WALLPAPERUI_DBG("Selected");
- elm_gengrid_item_selected_set(thm->item, EINA_TRUE);
- edje_object_signal_emit(elm_layout_edje_get(thm->content), "elm,state,selected", "app");
- }
- else
- {
+
+ edje_object_signal_emit(elm_layout_edje_get(thm->content),"elm,focus_highlight,show", "app");
+ memset(ad->current_preview_img_path, 0, sizeof(ad->current_preview_img_path));
+ strncpy(ad->current_preview_img_path, thm->path, MAX_LENGTH_LINE-1);
+ WALLPAPERUI_DBG("current_preview_img_path %s", ad->current_preview_img_path);
+ } else {
WALLPAPERUI_DBG("UnSelected");
elm_gengrid_item_selected_set(thm->item, EINA_FALSE);
edje_object_signal_emit(elm_layout_edje_get(thm->content), "elm,state,unselected", "app");
@@ -3386,134 +1676,206 @@ preview_grid_content_get(void *data, Evas_Object *obj, const char *part)
return contents;
}
+ WALLPAPERUI_TRACE_END;
return NULL;
}
-static void preview_grid_content_del(void *data, Evas_Object *obj)
+static void _preview_grid_content_del(void *data, Evas_Object *obj)
{
+ WALLPAPERUI_TRACE_BEGIN;
Thumbnail *thm = (Thumbnail *)data;
- free(thm->path);
- //memset(thm, 0xDEADBEAF, sizeof(Thumbnail));
- free(thm);
+ if(thm) {
+ free(thm->path);
+ free(thm->title);
+ free(thm);
+ }
+
+ WALLPAPERUI_TRACE_END;
}
-void wallpaper_on_item_selected(void *data, Evas_Object *obj, void *event_info)
+static void _wallpaper_show_focus_highlight(int selected_index)
{
WALLPAPERUI_TRACE_BEGIN;
Thumbnail *item = NULL;
- item = (Thumbnail *)data;
- if(item == NULL) {
- WALLPAPERUI_DBG("item == NULL");
- return;
- }
- elm_gengrid_item_selected_set(item->item, EINA_FALSE);
- edje_object_signal_emit(elm_layout_edje_get(item->content), "elm,state,selected", "app");
- item->bSelected = EINA_TRUE;
+ Elm_Object_Item *object_item = elm_gengrid_first_item_get(ad->gengrid);
- preview_page_data_s *preview_pd = (preview_page_data_s*)(item->data);
- preview_pd->current_page = item->index;
- elm_scroller_page_show(preview_pd->scroller, preview_pd->current_page, 0);
- current_index = item->index;
- cur_preview_item = item->item;
-
- Thumbnail *temp_item = item;
- item = NULL;
- Elm_Object_Item *object_item = elm_gengrid_first_item_get(gengrid);
- while(object_item)
- {
+ while (object_item) {
item = (Thumbnail *)elm_object_item_data_get(object_item);
- if(item && item != temp_item && item->path && item->bSelected)
- {
- WALLPAPERUI_DBG("path=%s", item->path);
- elm_gengrid_item_selected_set(item->item, EINA_FALSE);
- edje_object_signal_emit(elm_layout_edje_get(item->content), "elm,state,unselected", "app");
- item->bSelected = EINA_FALSE;
+
+ if (item && item->path && item->bSelected) {
+ if (item->index != selected_index) {
+ WALLPAPERUI_DBG("path=%s", item->path);
+ elm_gengrid_item_selected_set(item->item, EINA_FALSE);
+ edje_object_signal_emit(elm_layout_edje_get(item->content), "elm,state,unselected", "app");
+ item->bSelected = EINA_FALSE;
+ } else {
+ edje_object_signal_emit(elm_layout_edje_get(item->content), "elm,focus_highlight,show", "app");
+ }
}
object_item = elm_gengrid_item_next_get(object_item);
}
+ WALLPAPERUI_TRACE_END;
+}
+
+static void _wallpaper_on_item_selected(void *data, Evas_Object *obj, void *event_info)
+{
+ WALLPAPERUI_TRACE_BEGIN;
+ Thumbnail *temp_item = NULL;
+ Thumbnail *item = (Thumbnail *)data;
- if(flag_sel) {
- snprintf(sel_naviframe_title, sizeof(sel_naviframe_title), "%d/%d", preview_pd->current_page+1, elm_gengrid_items_count(gengrid));
- elm_object_item_part_text_set(sel_navi_item, "default", sel_naviframe_title);
+ if (item == NULL) {
+ WALLPAPERUI_DBG("item == NULL");
+ return;
}
+
+ if (item->type != WALLPAPER_TYPE_GALLERY) {
+// elm_object_signal_emit(ad->main_layout, "hide_preview", "preview_image");
+ elm_image_file_set(ad->preview_image, item->path, NULL);
+ memset(ad->current_preview_img_path, 0, sizeof(ad->current_preview_img_path));
+ strncpy(ad->current_preview_img_path, item->path, MAX_LENGTH_LINE-1);
+ WALLPAPERUI_DBG("current_preview_img_path %s", ad->current_preview_img_path);
+ }
+
+ elm_gengrid_item_selected_set(item->item, EINA_FALSE);
+ ad->preview_image_type = item->type;
+
+ item->bSelected = EINA_TRUE;
+
+ _wallpaper_show_focus_highlight(item->index);
+
+ state_data.flag_changed = EINA_TRUE;
+
+ WALLPAPERUI_TRACE_END;
}
-Evas_Object *preview_gengrid_add(Evas_Object *parent, void* data)
+static Evas_Object *main_gengrid_add(Evas_Object *parent, void* data)
{
WALLPAPERUI_TRACE_BEGIN;
Thumbnail *s_item = NULL;
+ int index = 0;
+ char *setting_value = NULL;
+ char string[MAX_LENGTH_LINE] = {0};
+ int setting_type = 0;
+ Eina_List *file_list = NULL;
+ char *temp = NULL;
+ int count = 0;
+ Thumbnail *temp_item = NULL;
+
+ if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &setting_value) != SYSTEM_SETTINGS_ERROR_NONE) {
+ WALLPAPERUI_ERR("system_settings_get_value_string() failed");
+ }
+
+ vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &setting_type);
+ WALLPAPERUI_DBG("VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE %d", setting_type);
- gengrid = elm_gengrid_add(parent);
- elm_scroller_policy_set(gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_gengrid_align_set(gengrid, 0.5, 0.0);
- elm_gengrid_horizontal_set(gengrid, EINA_TRUE);
- elm_gengrid_bounce_set(gengrid, EINA_FALSE, EINA_FALSE);
- elm_gengrid_multi_select_set(gengrid, EINA_FALSE);
- elm_object_style_set(gengrid, "no_effect");
- elm_gengrid_select_mode_set(gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
+ ad->gengrid = elm_gengrid_add(parent);
+ elm_scroller_policy_set(ad->gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+ evas_object_size_hint_weight_set(ad->gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(ad->gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_gengrid_align_set(ad->gengrid, 0.0, 1.0);
+ elm_gengrid_horizontal_set(ad->gengrid, EINA_TRUE);
+ elm_gengrid_bounce_set(ad->gengrid, EINA_FALSE, EINA_FALSE);
+ elm_gengrid_multi_select_set(ad->gengrid, EINA_FALSE);
+ elm_object_style_set(ad->gengrid, "no_effect");
+
+ elm_gengrid_select_mode_set(ad->gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
/*int iw, ih;
iw = 96 * elm_config_scale_get();
ih = 136 * elm_config_scale_get();*/
- elm_gengrid_item_size_set(gengrid, ELM_SCALE_SIZE(97), ELM_SCALE_SIZE(137));
+ elm_gengrid_item_size_set(ad->gengrid, ELM_SCALE_SIZE(195), ELM_SCALE_SIZE(195));
- gic = elm_gengrid_item_class_new();
- gic->item_style = "default";
- gic->func.text_get = NULL;
- gic->func.content_get = preview_grid_content_get;
- gic->func.state_get = NULL;
- gic->func.del = preview_grid_content_del;
+ gic_for_main = elm_gengrid_item_class_new();
+ gic_for_main->item_style = "default";
+ gic_for_main->func.text_get = NULL;
+ gic_for_main->func.content_get = _preview_grid_content_get;
+ gic_for_main->func.state_get = NULL;
+ gic_for_main->func.del = _preview_grid_content_del;
int i = 0;
- if(flag_sel) {
- for(i = 0; i < MAX_MULTIPLE_SELECTION; i++)
- {
- if(strlen(sel_lock_path[i])>1)
- {
- WALLPAPERUI_DBG("sel_lock_path[%d]=%s", i, sel_lock_path[i]);
+
+ /* Gallery icon */
+ s_item = (Thumbnail *)calloc(1, sizeof(Thumbnail));
+ if (s_item != NULL) {
+ if (setting_type == WALLPAPER_TYPE_DEFAULT) {
+ if(ad->last_preview_img_path != NULL) {
+ s_item->path = strdup(ad->last_preview_img_path);
+ } else {
+ s_item->path = strdup(ICONDIR"/no_gallery_bg.png");
+ }
+ } else {
+ s_item->path = setting_value;
+ s_item->bSelected = EINA_TRUE;
+
+ edje_object_signal_emit(elm_layout_edje_get(s_item->content),"elm,focus_highlight,show", "app");
+ //elm_object_signal_emit(ad->main_layout, "show_preview", "preview_image");
+ }
+
+ s_item->type = WALLPAPER_TYPE_GALLERY;
+ s_item->index = index++;
+ s_item->item = elm_gengrid_item_append(ad->gengrid, gic_for_main, s_item, _gallery_clicked_cb, s_item);
+ s_item->title = strdup(APP_STRING("IDS_LCKSCN_BODY_GALLERY"));
+ }
+ file_list = ecore_file_ls(DEFAULT_IMAGE_DIR);
+ count = eina_list_count(file_list);
+ WALLPAPERUI_DBG("count = %d", count);
+
+ /* default directory */
+ if (count > 0) {
+ for (i = 0; i < count ; i++){
+ temp = (char *)eina_list_nth(file_list, i);
+ if (temp) {
+ WALLPAPERUI_DBG("temp = %s", temp);
+ snprintf(string, sizeof(string), DEFAULT_IMAGE_DIR"%s", temp);
+
s_item = (Thumbnail *)calloc(1, sizeof(Thumbnail));
- if(s_item != NULL) {
- s_item->path = strdup(sel_lock_path[i]);
- s_item->index = i;
- s_item->data = data;
- if(i == 0) {
+ if (s_item) {
+ s_item->path = strdup(string);
+ s_item->type = WALLPAPER_TYPE_DEFAULT;
+ s_item->title = strdup(temp);
+ s_item->index = index++;
+
+ if (s_item->path && strcmp(s_item->path, setting_value) == 0) {
s_item->bSelected = EINA_TRUE;
+ WALLPAPERUI_DBG("selected item = %d", s_item->index);
} else {
s_item->bSelected = EINA_FALSE;
}
- s_item->item = elm_gengrid_item_append(gengrid, gic, s_item, wallpaper_on_item_selected, s_item);
+
+ s_item->item = elm_gengrid_item_append(ad->gengrid, gic_for_main, s_item, _wallpaper_on_item_selected, s_item);
}
}
}
- } else {
- for(i = 0; i < MAX_MULTIPLE_SELECTION; i++)
- {
- if(strlen(lock_path[i])>1)
- {
- WALLPAPERUI_DBG("path=%s", lock_path[i]);
- s_item = (Thumbnail *)calloc(1, sizeof(Thumbnail));
- s_item->path = strdup(lock_path[i]);
- s_item->index = i;
- s_item->data = data;
- if(i == 0) {
- s_item->bSelected = EINA_TRUE;
- } else {
- s_item->bSelected = EINA_FALSE;
- }
- s_item->item = elm_gengrid_item_append(gengrid, gic, s_item, wallpaper_on_item_selected, s_item);
- }
+
+ }
+
+ if (file_list!=NULL) {
+ eina_list_free(file_list);
+ }
+
+ /* Shows the portion of a gengrid internal grid containing a given item immediately */
+
+ Elm_Object_Item *object_item = elm_gengrid_first_item_get(ad->gengrid);
+
+ while (object_item) {
+ temp_item = (Thumbnail *)elm_object_item_data_get(object_item);
+
+ if (temp_item && temp_item->path && temp_item->bSelected) {
+ elm_gengrid_item_show(object_item, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ edje_object_signal_emit(elm_layout_edje_get(temp_item->content), "elm,focus_highlight,show", "app");
+ ad->preview_image_type = temp_item->type;
}
+ object_item = elm_gengrid_item_next_get(object_item);
}
+
WALLPAPERUI_TRACE_END;
- return gengrid;
+ return ad->gengrid;
}
static void _service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
@@ -3522,757 +1884,129 @@ static void _service_imageviewer_ug_result_cb(app_control_h request, app_control
if (result == APP_CONTROL_RESULT_SUCCEEDED) {
char **path_array = NULL;
int array_length = 0;
- int ret = -1;
- ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length);
+ char *str = "/opt/usr/share/lockscreen/wallpaper_list";
int j = 0;
- bool bresult = false; //for gallery added newly
- for(j = 0; j < array_length; j++)
+
+ if (app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length) == APP_CONTROL_ERROR_NONE) {
+ WALLPAPERUI_DBG("array_length = %d", array_length);
+
+ for (j = 0; j < array_length; j++) {
WALLPAPERUI_DBG("path_array[%d] = %s", j, path_array[j]);
+ }
- if(!strstr(path_array[0], ".png") && !strstr(path_array[0], ".jpg")) {
+ if (!strstr(path_array[0], ".png") && !strstr(path_array[0], ".jpg")) {
WALLPAPERUI_DBG("Do not edit the image!");
return;
}
- char *str = "/opt/usr/share/lockscreen/wallpaper_list";
WALLPAPERUI_DBG("strlen(str) = %d", strlen(str));
- if(flag_home && path_array[0]) {
- memset(home_path, 0, sizeof(home_path));
- strcpy(home_path, path_array[0]);
+ if (path_array[0]) {
+ memset(ad->saved_img_path, 0, sizeof(ad->saved_img_path));
+ strcpy(ad->saved_img_path[0], path_array[0]);
- elm_image_file_set(preview_image, path_array[0], NULL);
+ elm_image_file_set(ad->preview_image, path_array[0], NULL);
- if(strncmp(str,path_array[0],strlen(str)))
- {
+ if (strncmp(str,path_array[0],strlen(str))) {
WALLPAPERUI_DBG("it is not from /opt/usr/share/lockscreen/wallpaper_list home screen");
WALLPAPERUI_DBG("home screen path_array[0]=%s",path_array[0]);
-
- //add gallery node for deleting gallery added newly
- bresult = false;
- if(NULL == head)
- {
- WALLPAPERUI_DBG("_service_imageviewer_ug_result_cb home screen head = null");
- bresult = createNodeList();
- if(true == bresult && head)
- {
- WALLPAPERUI_DBG("_service_imageviewer_ug_result_cb home screen true == bresult");
- head->add_gallery_path = strdup(path_array[0]);
- }
- }
- else
- {
- addNode(path_array[0]);
- }
}
//set home icon in main
- elm_image_file_set(bg_home_icon, path_array[0], NULL);
- evas_object_show(bg_home_icon);
- flag_home_changed = EINA_TRUE;
+ state_data.flag_changed = EINA_TRUE;
- } else if(!flag_home && path_array[0]) {
- memset(lock_path[current_index], 0, sizeof(lock_path[current_index]));
- strcpy(lock_path[current_index], path_array[0]);
- WALLPAPERUI_DBG("lock_path[%d] = %s", current_index, lock_path[current_index]);
+ } else if (path_array[0] && array_length > 1) {
+ memset(ad->saved_img_path[0], 0, sizeof(ad->saved_img_path[0]));
+ strcpy(ad->saved_img_path[0], path_array[0]);
+ WALLPAPERUI_DBG("ad->saved_img_path[%d] = %s", 0, ad->saved_img_path[0]);
//set lock icon in main only for first image
- if(current_index == 0) {
- elm_image_file_set(bg_lock_icon, path_array[0], NULL);
- evas_object_show(bg_lock_icon);
- }
- if(strncmp(str,path_array[0],strlen(str)))
- {
+ if (strncmp(str,path_array[0],strlen(str))) {
WALLPAPERUI_DBG("it is not from /opt/usr/share/lockscreen/wallpaper_list lock screen");
WALLPAPERUI_DBG("lock screen path_array[0]=%s",path_array[0]);
-
- //add gallery node for deleting gallery added newly
- bresult = false;
- if(NULL == head)
- {
- WALLPAPERUI_DBG("_service_imageviewer_ug_result_cb home screen head = null");
- bresult = createNodeList();
- if(true == bresult && head)
- {
- WALLPAPERUI_DBG("_service_imageviewer_ug_result_cb home screen true == bresult");
- head->add_gallery_path = strdup(path_array[0]);
- }
- }
- else
- {
- addNode(path_array[0]);
- }
}
- if(cur_preview_item) {
- Thumbnail *s_item = (Thumbnail *)elm_object_item_data_get(cur_preview_item);
- if(s_item){
- s_item->path = strdup(path_array[0]);
- elm_gengrid_item_update(s_item->item);
-
- preview_page_data_s *preview_pd = (preview_page_data_s*)(s_item->data);
- if(preview_pd){
- elm_image_file_set(preview_pd->page[s_item->index], s_item->path, NULL);
- }
- }
- }
- flag_lock_changed = EINA_TRUE;
+ state_data.flag_changed = EINA_TRUE;
}
int i = 0;
- for(i=0; i<array_length; i++) {
- if(path_array[i]) {
+ for (i=0; i<array_length; i++) {
+ if (path_array[i]) {
free(path_array[i]);
path_array[i] = NULL;
}
}
- done_button_cb();
- }
-}
-
-static void edit_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- wallpaper_ui_service_appdata *da = (wallpaper_ui_service_appdata *)data;
- edje_object_signal_emit(elm_layout_edje_get(obj), "preview_icon_part_dim", "elm");
-
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- flag_edit_click = EINA_TRUE;
- WALLPAPERUI_DBG("1 flag_edit_click=%d",flag_edit_click);
-
- app_control_h pService;
- app_control_create(&pService);
- app_control_set_operation(pService, "http://tizen.org/appcontrol/operation/image/crop");
- if(flag_home) {
- WALLPAPERUI_DBG("home_path = %s", home_path);
- app_control_set_uri(pService, home_path);
- } else {
- WALLPAPERUI_DBG("lock_path[%d] = %s", current_index, lock_path[current_index]);
- app_control_set_uri(pService, lock_path[current_index]);
- }
- app_control_add_extra_data(pService, "http://tizen.org/appcontrol/data/image/crop_mode", "fit_to_screen");
- Evas_Object *win = (Evas_Object *)ug_get_window();
- app_control_set_window(pService, elm_win_xwindow_get(win));
- app_control_send_launch_request(pService, _service_imageviewer_ug_result_cb, data);
- app_control_destroy(pService);
-}
-
-void preview_icon(Evas_Object *parent,void* data)
-{
- WALLPAPERUI_TRACE_BEGIN;
-#if 0
- Evas_Object *preview_icon_layout = elm_layout_add(parent);
- elm_layout_file_set(preview_icon_layout, EDJDIR"/popup-wallpaper.edj", "preview_icon");
- evas_object_size_hint_weight_set(preview_icon_layout, 0, 0);
- evas_object_size_hint_align_set(preview_icon_layout, 0, EVAS_HINT_FILL);
- elm_object_part_content_set(parent, "preview_icon_part", preview_icon_layout);
- evas_object_show(preview_icon_layout);
- evas_object_event_callback_add(preview_icon_layout, EVAS_CALLBACK_MOUSE_UP, edit_clicked_cb, data);
-#endif
- edje_object_signal_callback_add(_EDJ(parent), "cliper_clicked", "edj", edit_clicked_cb, ad);
- elm_object_translatable_part_text_set(parent, "preview_icon_part", APP_STRING("IDS_HS_BUTTON_EDIT_ABB"));
- WALLPAPERUI_TRACE_END;
-
-}
-
-static void preview_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- if(flag_edit_click) {
- WALLPAPERUI_DBG("2 flag_edit_click=%d",flag_edit_click);
- flag_edit_click = EINA_FALSE;
- return;
- }
-
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
-
- elm_naviframe_item_pop(ad->navi_bar);
-
- flag_main = EINA_TRUE;
-}
-
-
-static void preview_scroller_scroll_cb(void *data, Evas_Object *scroller, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- preview_page_data_s *pd = (preview_page_data_s*)data;
- int page_no;
-
- elm_scroller_current_page_get(pd->scroller, &page_no, NULL);
- WALLPAPERUI_DBG("preview_scroller_scroll_cb~~~~~~~~~~page_no = %d", page_no);
- if (pd->current_page != page_no) {
- pd->current_page = page_no;
- }
-
- WALLPAPERUI_DBG("current_page = %d",pd->current_page);
- WALLPAPERUI_TRACE_END;
-}
-
-static void preview_scroller_anim_finished(void *data, Evas_Object *scroller, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- preview_page_data_s *pd = (preview_page_data_s*)data;
- int page_no;
-
- elm_scroller_current_page_get(pd->scroller, &page_no, NULL);
- WALLPAPERUI_DBG("preview_scroller_scroll_cb~~~~~~~~~~page_no = %d", page_no);
- if (pd->current_page != page_no) {
- if(page_no > pd->current_page){
- cur_preview_item = elm_gengrid_item_next_get(cur_preview_item);
- }else{
- cur_preview_item = elm_gengrid_item_prev_get(cur_preview_item);
- }
- pd->current_page = page_no;
- current_index = pd->current_page;
-
- elm_gengrid_item_selected_set(cur_preview_item, EINA_TRUE);
- Thumbnail *s_item = (Thumbnail *)elm_object_item_data_get(cur_preview_item);
- if(s_item){
- edje_object_signal_emit(elm_layout_edje_get(s_item->content), "elm,state,selected", "app");
- s_item->bSelected = EINA_TRUE;
+ _done_button_cb();
}
}
- WALLPAPERUI_DBG("current_page = %d",pd->current_page);
-
- if(flag_sel) {
- snprintf(sel_naviframe_title, sizeof(sel_naviframe_title), "%d/%d", page_no+1, elm_gengrid_items_count(gengrid));
- elm_object_item_part_text_set(sel_navi_item, "default", sel_naviframe_title);
- }
-}
-
-static void preview_layout_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- preview_page_data_s *pd = (preview_page_data_s*)data;
- Evas_Coord w, h;
-
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
-
- int i = 0;
- while(pd->page[i] != NULL){
- evas_object_size_hint_min_set(pd->page[i], w, h);
- i++;
- }
-
- elm_scroller_page_size_set(pd->scroller, w, h);
- elm_scroller_page_show(pd->scroller, pd->current_page, 0);
- WALLPAPERUI_TRACE_END;
-}
-
-void wallpaper_preveiw_append_page(void* data, Evas_Object *box)
-{
- preview_page_data_s *preview_pd = (preview_page_data_s*)data;
- WALLPAPERUI_TRACE_BEGIN;
-
- int i = 0;
- while(i < MAX_MULTIPLE_SELECTION && (strlen(lock_path[i]) > 1)){
- WALLPAPERUI_DBG("lock_path[%d] : %s",i, lock_path[i]);
- Evas_Object *page_layout = elm_layout_add(box);
- elm_layout_file_set(page_layout, EDJDIR"/popup-wallpaper.edj", "pagecontrol_preview_page_layout");
- evas_object_size_hint_weight_set(page_layout, 0, 0);
- evas_object_size_hint_align_set(page_layout, 0, EVAS_HINT_FILL);
- edje_object_signal_callback_add(_EDJ(page_layout), "preview_clicked", "edj", preview_clicked_cb, (void *)ad);
- evas_object_show(page_layout);
-
- Evas_Object *page_image = elm_image_add(page_layout);
- elm_image_file_set(page_image, lock_path[i], NULL);
- preview_pd->page[i] = page_image;
-
- elm_image_aspect_fixed_set(page_image, EINA_TRUE);
- elm_image_fill_outside_set(page_image, EINA_TRUE);
- elm_image_preload_disabled_set(page_image, EINA_FALSE);
- elm_object_part_content_set(page_layout, "page", page_image);
- elm_box_pack_end(box, page_layout);
- i++;
- }
WALLPAPERUI_TRACE_END;
}
-void wallpaper_preveiw_main()
+static void _edit_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
WALLPAPERUI_TRACE_BEGIN;
- flag_main = EINA_FALSE;
-
- Evas_Object *preveiw_main_layout = NULL;
-
- if(flag_home){
- preveiw_main_layout = elm_layout_add(ad->navi_bar);
- elm_layout_file_set(preveiw_main_layout, EDJDIR"/popup-wallpaper.edj", "wallpaper.preview");
- evas_object_size_hint_weight_set(preveiw_main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- preview_image = elm_image_add(preveiw_main_layout);
-
- elm_image_file_set(preview_image, home_path, NULL);
- elm_image_aspect_fixed_set(preview_image, EINA_TRUE);
- elm_image_fill_outside_set(preview_image, EINA_TRUE);
- elm_image_preload_disabled_set(preview_image, EINA_TRUE);
- elm_object_part_content_set(preveiw_main_layout, "preview", preview_image);
- edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "preview_clicked", "edj", preview_clicked_cb, (void *)ad);
- elm_object_part_content_unset(preveiw_main_layout, "thumblist");
- evas_object_show(preveiw_main_layout);
-
- int value = 0;
- vconf_get_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, &value);
- WALLPAPERUI_DBG("VCONFKEY_WALLPAPER_HOME_WALLPAPER_IS_DEFAULT = %d", value);
-
-#if !DiSABLE_CROP_VIEW
- if(value == 0){
- WALLPAPERUI_DBG("!!!home_path = %s", home_path);
- edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "cliper_clicked", "edj", edit_clicked_cb, ad);
- elm_object_translatable_part_text_set(preveiw_main_layout, "preview_icon_part", APP_STRING("IDS_HS_BUTTON_EDIT_ABB"));
- }
-#endif
-
- }else{
- if(!strcmp(lock_path[0], LOCK_SERVICE_DEFAULT_PATH)){
- WALLPAPERUI_DBG("my interest##########");
- return ;
- }
- preview_page_data_s *preview_pd = calloc(1, sizeof(preview_page_data_s));
- preveiw_main_layout = elm_layout_add(ad->navi_bar);
- elm_layout_file_set(preveiw_main_layout, EDJDIR"/popup-wallpaper.edj", "preview_pagecontrol_layout");
- evas_object_size_hint_weight_set(preveiw_main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(preveiw_main_layout);
- evas_object_event_callback_add(preveiw_main_layout, EVAS_CALLBACK_RESIZE, preview_layout_resize_cb, preview_pd);
-
- /* Create Scroller */
- Evas_Object *preview_scroller = elm_scroller_add(preveiw_main_layout);
- elm_scroller_loop_set(preview_scroller, EINA_FALSE, EINA_FALSE);
- evas_object_size_hint_weight_set(preview_scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(preview_scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_page_relative_set(preview_scroller, 1.0, 0.0);
- elm_scroller_policy_set(preview_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- elm_scroller_page_scroll_limit_set(preview_scroller, 1, 0);
- elm_object_scroll_lock_y_set(preview_scroller, EINA_TRUE);
- elm_object_part_content_set(preveiw_main_layout, "scroller", preview_scroller);
- evas_object_smart_callback_add(preview_scroller, "scroll,anim,stop", preview_scroller_anim_finished, preview_pd);
-
- preview_pd->scroller = preview_scroller;
-
- /* Create Box */
- Evas_Object *box = elm_box_add(preview_scroller);
- elm_box_horizontal_set(box, EINA_TRUE);
- elm_object_content_set(preview_scroller, box);
- evas_object_show(box);
-
- wallpaper_preveiw_append_page(preview_pd, box);
- preview_pd->current_page = 0;
-
- int value = 0;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, &value);
- WALLPAPERUI_DBG("VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = %d", value);
-
-#if !DiSABLE_CROP_VIEW
- if(value == WALLPAPER_TYPE_GALLERY){
- WALLPAPERUI_DBG("!!!lock_path[0] = %s", lock_path[0]);
- edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "cliper_clicked", "edj", edit_clicked_cb, ad);
- elm_object_translatable_part_text_set(preveiw_main_layout, "preview_icon_part", APP_STRING("IDS_HS_BUTTON_EDIT_ABB"));
- }
-#endif
- gengrid = preview_gengrid_add(preveiw_main_layout, preview_pd);
- elm_object_part_content_set(preveiw_main_layout, "thumblist", gengrid);
- evas_object_show(gengrid);
- cur_preview_item = elm_gengrid_first_item_get(gengrid);
- }
-
- Elm_Object_Item *navi_item = elm_naviframe_item_push(ad->navi_bar, NULL, NULL, NULL, preveiw_main_layout, NULL);
- elm_naviframe_item_title_visible_set(navi_item, EINA_FALSE);
-}
-
-static void sel_cancel_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- flag_sel = EINA_FALSE;
-
- elm_naviframe_item_pop(ad->navi_bar);
- ad->sel_nf_it = NULL;
-
- app_control_h svc_handle = NULL;
-
- if(flag_lock_from_default) {
- //do not need do anything
- WALLPAPERUI_DBG("!flag_home && flag_home_from_default: do not need do anything");
- } else if(flag_lock_from_gallery) {
- //relaunch gallery ug
- WALLPAPERUI_DBG("!flag_home && flag_lock_from_gallery: relaunch gallery ug");
- if(!app_control_create(&svc_handle)) {
- app_control_set_operation(svc_handle, APP_CONTROL_OPERATION_PICK);
- Evas_Object *win = (Evas_Object *)ug_get_window();
- if(win == NULL) {
- app_control_set_window(svc_handle, elm_win_xwindow_get(ad->win));
- }else {
- app_control_set_window(svc_handle, elm_win_xwindow_get(win));
- }
- app_control_set_app_id(svc_handle, "gallery-efl");
- app_control_set_mime(svc_handle, "image/*");
-
- app_control_add_extra_data(svc_handle, "max-count", "6");
- app_control_add_extra_data(svc_handle, "launch-type", "select-multiple");
-
- app_control_add_extra_data(svc_handle, "file-type","image");
- app_control_add_extra_data(svc_handle, "hide-personal", "true");
- app_control_send_launch_request(svc_handle, service_gallery_ug_result_cb, data);
- app_control_destroy(svc_handle);
- }
- }
-}
-
-static void sel_done_button_cb(void *data, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
- if(obj) {
- elm_object_signal_emit(obj, "pressed", "elm");
- }
-
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_gallery_icon_layout), "elm,state,selected", "app");
- //edje_object_signal_emit(elm_layout_edje_get(ad->lock_default_icon_layout), "elm,state,unselected", "app");
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_signal_emit(ad->pd->page[0], "gallery_icon_selected", "bg");
- } else { WALLPAPERUI_ERR("@@@ERROR@@@"); }
-
- if(flag_from_default == EINA_TRUE) {
- WALLPAPERUI_DBG("from defalut wallpaper");
- flag_lock_from_default = EINA_TRUE;
- flag_lock_from_gallery = EINA_FALSE;
- flag_lock_from_cp = EINA_FALSE;
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_DEFAULLT);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_DEFAULLT");
- } else {
- WALLPAPERUI_DBG("from gallery wallpaper");
- flag_lock_from_default = EINA_FALSE;
- flag_lock_from_gallery = EINA_TRUE;
- flag_lock_from_cp = EINA_FALSE;
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE = WALLPAPER_TYPE_GALLERY");
- }
-
- flag_sel = EINA_FALSE;
- flag_lock_changed = EINA_TRUE;
-
- memset(lock_path, 0, sizeof(lock_path));
- //set bg_lock_icon
- int i = 0;
- for(; (i<MAX_MULTIPLE_SELECTION) && strlen(sel_lock_path[i]) > 0 ; i++) {
- if(i == 0) {
- elm_image_file_set(bg_lock_icon, sel_lock_path, NULL);
- evas_object_show(bg_lock_icon);
- }
-
- strncpy(lock_path[i], sel_lock_path[i], MAX_LENGTH_LINE-1);
- WALLPAPERUI_DBG("lock_path[%d] = %s", i, lock_path[i]);
- }
-
- done_button_cb();
-
- elm_naviframe_item_pop_to(nf_it);
- ad->sel_nf_it = NULL;
-}
-
-void sel_wallpaper_preveiw_append_page(void* data, Evas_Object *box)
-{
- preview_page_data_s *preview_pd = (preview_page_data_s*)data;
- WALLPAPERUI_TRACE_BEGIN;
-
- int i = 0;
- while(i < MAX_MULTIPLE_SELECTION && (strlen(sel_lock_path[i]) > 1)){
- WALLPAPERUI_DBG("sel_lock_path[%d] : %s",i, sel_lock_path[i]);
- Evas_Object *page_layout = elm_layout_add(box);
- elm_layout_file_set(page_layout, EDJDIR"/popup-wallpaper.edj", "pagecontrol_preview_page_layout");
- evas_object_size_hint_weight_set(page_layout, 0, 0);
- evas_object_size_hint_align_set(page_layout, 0, EVAS_HINT_FILL);
- evas_object_show(page_layout);
-
- Evas_Object *page_image = elm_image_add(page_layout);
- elm_image_file_set(page_image, sel_lock_path[i], NULL);
- preview_pd->page[i] = page_image;
-
- elm_image_aspect_fixed_set(page_image, EINA_TRUE);
- elm_image_fill_outside_set(page_image, EINA_TRUE);
- elm_image_preload_disabled_set(page_image, EINA_FALSE);
- elm_object_part_content_set(page_layout, "page", page_image);
- elm_box_pack_end(box, page_layout);
- i++;
- }
- WALLPAPERUI_TRACE_END;
-}
-
-static void sel_service_imageviewer_ug_result_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data)
-{
- WALLPAPERUI_TRACE_BEGIN;
- if(result == APP_CONTROL_RESULT_SUCCEEDED) {
- char **path_array = NULL;
- int array_length = 0;
- int ret = -1;
- ret = app_control_get_extra_data_array(reply, "http://tizen.org/appcontrol/data/selected", &path_array, &array_length);
- int j = 0;
- for(j = 0; j < array_length; j++)
- WALLPAPERUI_DBG("path_array[%d] = %s", j, path_array[j]);
- flag_edit_click = EINA_FALSE;
-
- if(!strstr(path_array[0], ".png")
- && !strstr(path_array[0], ".PNG")
- && !strstr(path_array[0], ".jpg")
- && !strstr(path_array[0], ".gif")) {
- WALLPAPERUI_DBG("Do not edit the image!: path_array[0] = %s", path_array[0]);
- return;
- }
+ Thumbnail *item = NULL;
+ Elm_Object_Item *object_item = NULL;
+ Evas_Object *win = NULL;
- memset(sel_lock_path[current_index], 0, sizeof(sel_lock_path[current_index]));
- strncpy(sel_lock_path[current_index], path_array[0], MAX_LENGTH_LINE-1);
- WALLPAPERUI_DBG("sel_lock_path[%d] = %s", current_index, sel_lock_path[current_index]);
- bool bresult = false;
- if(NULL == head)
- {
- WALLPAPERUI_DBG(" sel_service_imageviewer_ug_result_cb head = null");
- bresult = createNodeList();
- if(true == bresult && head)
- {
- WALLPAPERUI_DBG(" sel_service_imageviewer_ug_result_cb true == bresult");
- head->add_gallery_path = strdup(path_array[0]);
- WALLPAPERUI_DBG("head->add_gallery_path = %s",head->add_gallery_path);
- }
- }
- else
- {
- WALLPAPERUI_DBG("sel_service_imageviewer_ug_result_cb addNode");
- addNode(path_array[0]);
- }
+ feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- if(cur_preview_item) {
- Thumbnail *s_item = (Thumbnail *)elm_object_item_data_get(cur_preview_item);
- if(s_item){
- s_item->path = strdup(path_array[0]);
- elm_gengrid_item_update(s_item->item);
+ WALLPAPERUI_DBG("1 flag_edit_click=%d",state_data.flag_edit_click);
- preview_page_data_s *preview_pd = (preview_page_data_s*)(s_item->data);
- if(preview_pd){
- elm_image_file_set(preview_pd->page[s_item->index], s_item->path, NULL);
- }
- }
- }
+ if (ad->preview_image_type == WALLPAPER_TYPE_DEFAULT || state_data.flag_edit_click == EINA_FALSE) {
+ WALLPAPERUI_DBG("DEFAULT TYPE NOT SUPPORT PREVIEW");
+ return;
}
-}
-
-static void sel_edit_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- flag_edit_click = EINA_TRUE;
- WALLPAPERUI_DBG("3 flag_edit_click=%d",flag_edit_click);
app_control_h pService;
app_control_create(&pService);
app_control_set_operation(pService, "http://tizen.org/appcontrol/operation/image/crop");
- WALLPAPERUI_DBG("sel_lock_path[%d] = %s", current_index, sel_lock_path[current_index]);
- app_control_set_uri(pService, sel_lock_path[current_index]);
- app_control_add_extra_data(pService, "http://tizen.org/appcontrol/data/image/crop_mode", "fit_to_screen");
- Evas_Object *win = (Evas_Object *)ug_get_window();
- app_control_set_window(pService, elm_win_xwindow_get(win));
- app_control_send_launch_request(pService, sel_service_imageviewer_ug_result_cb, data);
- app_control_destroy(pService);
-}
-
-void sel_wallpaper_preveiw_main()
-{
- WALLPAPERUI_TRACE_BEGIN;
-
- flag_main = EINA_FALSE;
- flag_sel = EINA_TRUE;
+ app_control_set_app_id(pService, "image-viewer-efl");
+// app_control_set_uri(pService, lock_path[current_index]);
- elm_object_disabled_set(ad->win, EINA_FALSE);
-
- Evas_Object *preveiw_main_layout = NULL;
- if(!flag_home) {
- preview_page_data_s *preview_pd = calloc(1, sizeof(preview_page_data_s));
-
- preveiw_main_layout = elm_layout_add(ad->navi_bar);
- elm_layout_file_set(preveiw_main_layout, EDJDIR"/popup-wallpaper.edj", "preview_pagecontrol_layout");
- evas_object_size_hint_weight_set(preveiw_main_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(preveiw_main_layout);
-
- evas_object_event_callback_add(preveiw_main_layout, EVAS_CALLBACK_RESIZE, preview_layout_resize_cb, preview_pd);
-
- /* Create Scroller */
- Evas_Object *preview_scroller = elm_scroller_add(preveiw_main_layout);
- elm_scroller_loop_set(preview_scroller, EINA_FALSE, EINA_FALSE);
- evas_object_size_hint_weight_set(preview_scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(preview_scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_scroller_page_relative_set(preview_scroller, 1.0, 0.0);
- elm_scroller_policy_set(preview_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- elm_scroller_page_scroll_limit_set(preview_scroller, 1, 0);
- elm_object_scroll_lock_y_set(preview_scroller, EINA_TRUE);
- elm_object_part_content_set(preveiw_main_layout, "scroller", preview_scroller);
- //evas_object_smart_callback_add(preview_scroller, "scroll", preview_scroller_scroll_cb, preview_pd);
- evas_object_smart_callback_add(preview_scroller, "scroll,anim,stop", preview_scroller_anim_finished, preview_pd);
-
- preview_pd->scroller = preview_scroller;
-
- /* Create Box */
- Evas_Object *box = elm_box_add(preview_scroller);
- elm_box_horizontal_set(box, EINA_TRUE);
- elm_object_content_set(preview_scroller, box);
- evas_object_show(box);
-
- sel_wallpaper_preveiw_append_page(preview_pd, box);
- preview_pd->current_page = 0;
-
- if(!flag_from_default){
- WALLPAPERUI_DBG("!!!sel_lock_path[0] = %s", sel_lock_path[0]);
-
- edje_object_signal_callback_add(_EDJ(preveiw_main_layout), "cliper_clicked", "edj", sel_edit_clicked_cb, ad);
- elm_object_translatable_part_text_set(preveiw_main_layout, "preview_icon_part", APP_STRING("IDS_HS_BUTTON_EDIT_ABB"));
+ object_item = elm_gengrid_first_item_get(ad->gengrid);
+ while (object_item) {
+ item = (Thumbnail *)elm_object_item_data_get(object_item);
+ if(item->path && item->bSelected) {
+ WALLPAPERUI_DBG("path=%s", item->path);
+ app_control_set_uri(pService, item->path);
}
-
- gengrid = preview_gengrid_add(preveiw_main_layout, preview_pd);
- elm_object_part_content_set(preveiw_main_layout, "thumblist", gengrid);
- evas_object_show(gengrid);
- cur_preview_item = elm_gengrid_first_item_get(gengrid);
-
- snprintf(sel_naviframe_title, sizeof(sel_naviframe_title), "%d/%d", preview_pd->current_page+1, elm_gengrid_items_count(gengrid));
- sel_navi_item = elm_naviframe_item_push(ad->navi_bar, NULL, NULL, NULL, preveiw_main_layout, NULL);
+ object_item = elm_gengrid_item_next_get(object_item);
}
- /* Title Cancel Button */
- Evas_Object *cancel_btn = elm_button_add(ad->navi_bar);
- elm_object_style_set(cancel_btn, "naviframe/title_text_left");
- elm_object_text_set(cancel_btn, APP_STRING("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"));
- evas_object_smart_callback_add(cancel_btn, "clicked", sel_cancel_button_cb, NULL);
- elm_object_item_part_content_set(sel_navi_item, "title_left_text_btn", cancel_btn);
+ app_control_add_extra_data(pService, "http://tizen.org/appcontrol/data/image/crop_mode", "fit_to_screen");
+ win = (Evas_Object *)ug_get_window();
+ app_control_set_launch_mode(pService, APP_CONTROL_LAUNCH_MODE_GROUP);
+ app_control_send_launch_request(pService, _service_imageviewer_ug_result_cb, data);
+ app_control_destroy(pService);
- /* Title Done Button */
- Evas_Object *done_btn = elm_button_add(ad->navi_bar);
- elm_object_style_set(done_btn, "naviframe/title_text_right");
- elm_object_text_set(done_btn, APP_STRING("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
- evas_object_smart_callback_add(done_btn, "clicked", sel_done_button_cb, NULL);
- elm_object_item_part_content_set(sel_navi_item, "title_right_text_btn", done_btn);
- ad->sel_nf_it = sel_navi_item;
+ WALLPAPERUI_TRACE_END;
}
-#if 0
-void wallpaper_preveiw_main()
+static void _preview_clicked_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
WALLPAPERUI_TRACE_BEGIN;
- flag_main = EINA_FALSE;
-
- Evas_Object *layout = elm_layout_add(ad->navi_bar);
- elm_layout_file_set(layout, EDJDIR"/popup-wallpaper.edj", "wallpaper.preview");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- preview_image = elm_image_add(layout);
- int i = 0;
- if(flag_home) {
- elm_image_file_set(preview_image, home_path, NULL);
- } else {
- int i = 0;
- while(i < MAX_MULTIPLE_SELECTION) {
- if(strlen(lock_path[i]) > 1) {
- elm_image_file_set(preview_image, lock_path[i], NULL);
- current_index = i;
- break;
- }
- i++;
- }
+ if (state_data.flag_edit_click) {
+ WALLPAPERUI_DBG("flag_edit_click=%d",state_data.flag_edit_click);
+ state_data.flag_edit_click = EINA_FALSE;
+ return;
}
- elm_image_aspect_fixed_set(preview_image, EINA_TRUE);
- elm_image_fill_outside_set(preview_image, EINA_TRUE);
- elm_image_preload_disabled_set(preview_image, EINA_TRUE);
- elm_object_part_content_set(layout, "preview", preview_image);
- edje_object_signal_callback_add(_EDJ(layout), "preview_clicked", "edj", preview_clicked_cb, (void *)ad);
-
- if(!flag_home) {
- gengrid = preview_gengrid_add(layout);
- elm_object_part_content_set(layout, "thumblist", gengrid);
- evas_object_show(gengrid);
- } else {
- elm_object_part_content_unset(layout, "thumblist");
- }
+ feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
- if(flag_home){
- if(!((home_path && ((!strcmp(home_path, HOME_DEFAULT_PATH))
- || (!strcmp(home_path, LOCK_DEFAULT_PATH))
- || (!strcmp(home_path, HOME_SETTING_DEFAULT_PATH))
- || (!strcmp(home_path, LOCK_SETTING_DEFAULT_PATH)))))){
- WALLPAPERUI_DBG("!!!home_path = %s", home_path);
-
- Evas_Object * image_layout = elm_image_add(layout);
- elm_image_file_set(image_layout, ICONDIR"/Wallpapers_setting_ic.png", NULL);
- elm_object_part_content_set(layout, "preview_icon_part", image_layout);
- elm_image_aspect_fixed_set(image_layout, EINA_FALSE);
- evas_object_show(image_layout);
- evas_object_event_callback_add(image_layout, EVAS_CALLBACK_MOUSE_UP, edit_clicked_cb, ad);
- }
- }else{
- if(!((lock_path[i] && ((!strcmp(lock_path[i], HOME_DEFAULT_PATH))
- || (!strcmp(lock_path[i], LOCK_DEFAULT_PATH))
- || (!strcmp(lock_path[i], HOME_SETTING_DEFAULT_PATH))
- || (!strcmp(lock_path[i], LOCK_SETTING_DEFAULT_PATH))
- || (!strcmp(lock_path[i], LOCK_SERVICE_DEFAULT_PATH)))))){
-
- WALLPAPERUI_DBG("!!!lock_path[i] = %s", lock_path[i]);
- Evas_Object * image_layout = elm_image_add(layout);
- elm_image_file_set(image_layout, ICONDIR"/Wallpapers_setting_ic.png", NULL);
- elm_object_part_content_set(layout, "preview_icon_part", image_layout);
- elm_image_aspect_fixed_set(image_layout, EINA_FALSE);
- evas_object_show(image_layout);
- evas_object_event_callback_add(image_layout, EVAS_CALLBACK_MOUSE_UP, edit_clicked_cb, ad);//fix P141007-02013, block the edit callback by ray on 2014.10.8
- }
- }
+ elm_naviframe_item_pop(ad->navi_bar);
- evas_object_show(layout);
- //ea_object_event_callback_add(ad->navi_bar, EA_CALLBACK_BACK, wallpaper_preview_back_key_cb, (void*)ad);
- Elm_Object_Item *navi_item = elm_naviframe_item_push(ad->navi_bar, NULL, NULL, NULL, layout, NULL);
- elm_naviframe_item_title_visible_set(navi_item, EINA_FALSE);
WALLPAPERUI_TRACE_END;
}
-#endif
-
-void wallpaper_share_logging(char* uri, char* cAppid, char* cFeature, char* cExtra, char* cValue)
-{
-
-#if DISABLE_LOGING_WALLPAPER
- return;
-#else
- //uri : USE_APP_FEATURE_SURVEY_URI or REPORT_APP_STATUS_SURVEY_URI
-
- samsung_log_manager_h log_mgr;
- samsung_log_manager_create(&log_mgr);
- if (!log_mgr) {
- WALLPAPERUI_DBG("log_mgr is not created! Create log manager");
- samsung_log_manager_create(&log_mgr);
- }
-
- bundle *log_data;
- log_data = bundle_create();
- bundle_add(log_data, "app_id", cAppid);
- bundle_add(log_data, "feature", cFeature);
- if(cExtra) bundle_add(log_data, "extra", cExtra);
- if(cValue) bundle_add(log_data, "value", cValue);
-
- unsigned int request_id = 0;
- int ret = samsung_log_manager_insert(log_mgr, uri, log_data, NULL, NULL, &request_id);
- if (ret) {
- WALLPAPERUI_DBG("samsung_log_manager_insert() .. [0x%x]", ret);
- } else {
- WALLPAPERUI_DBG("request id = %d", request_id);
- }
-
- bundle_free(log_data);
- log_data = NULL;
-
- samsung_log_manager_destroy(log_mgr);
-#endif
-}
+/**
+* @}
+*/
+/* End of file */
diff --git a/src/wallpaper-ui-service-main.h b/src/wallpaper-ui-service-main.h
deleted file mode 100755
index c3e07ac..0000000
--- a/src/wallpaper-ui-service-main.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * indicator
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Sung park <sung1103.park@samsung.com>
- *
- * 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.
- *
- */
-
-#ifndef __WALLPAPER_PREVIEW_H__
-#define __WALLPAPER_PREVIEW_H__
-
-#include "wallpaper-ui-service.h"
-
-#include <app.h>
-#include <Elementary.h>
-#include <Ecore_X.h>
-#include <Eina.h>
-#include <Evas.h>
-#if !DISABLE_LOGING_WALLPAPER
-#include <samsung_log_manager.h>
-#include <samsung_log_manager_uri.h>
-#endif
-
-#include "wallpaper-ui-service-debug.h"
-
-typedef void *filter_handle;
-typedef void *media_handle;
-
-typedef struct {
- Evas_Object *content;
-
- Elm_Object_Item *item;
- bool bSelected;
- char *path;
- int index;
- void *data;
-} Thumbnail;
-
-typedef struct {
- Evas_Object *content;
-
- Elm_Object_Item *item;
- char *path;
- Evas_Object *check;
- Eina_Bool check_state;
- bool is_last;
-} default_item_s;
-
-#define GENGRID_ITEM_SIZE (126)
-#define MAX_LENGTH_LINE 1600
-
-#ifndef VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT
-#define VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT "db/lockscreen/home_wallpaper_is_default"
-#endif
-
-#ifndef VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE
-#define VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE "db/lockscreen/wallpaper_type"
-#endif
-
-#ifndef VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT
-#define VCONFKEY_LOCKSCREEN_WALLPAPER_COUNT "db/lockscreen/wallpaper_count"
-#endif
-
-#ifndef DEFAULT_INTEREST_PATH
-#define DEFAULT_INTEREST_PATH "/opt/usr/apps/org.tizen.wallpaper-service/data/default_images/myinterest_default.png"
-#endif
-
-#ifndef WALLPAPER_SHARE_LOGGING_H_
-#define WALLPAPER_SHARE_LOGGING_H_
-void wallpaper_share_logging(char* uri, char* cAppid, char* cFeature, char* cExtra, char* cValue);
-#endif /* SETTING_SHARE_LOGGING_H_ */
-
-void wallpaper_destory(void *data);
-static void wallpaper_back_key_cb(void *data, Evas_Object *obj, void *event_info);
-
-#endif
diff --git a/src/wallpaper-ui-service.c b/src/wallpaper-ui-service.c
index 92bd046..81a67cf 100755
--- a/src/wallpaper-ui-service.c
+++ b/src/wallpaper-ui-service.c
@@ -1,9 +1,5 @@
/*
- * setting
- *
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd.
- *
- * Contact: Sung park <sung1103.park@samsung.com>
+ * Copyright (c) 20014-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.
@@ -16,50 +12,35 @@
* 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 <app.h>
-//#include <ui-gadget.h>
#include <Elementary.h>
#include <Evas.h>
#include <Ecore_X.h>
-
-//#include <appcore-efl.h>
-//#include <appcore-common.h>
#include <vconf.h>
-#include <efl_assist.h>
#include <system_settings.h>
-#include <notification.h>
#include <app_alarm.h>
#include <media_content.h>
#include <fcntl.h>
#include <dbus/dbus.h>
+#include <app_control_internal.h>
+
#include "wallpaper-ui-service.h"
-#include "popup-wallpaper-main.h"
-#include "popup-color-theme-main.h"
-#if !DISABLE_FESTIVAL_WALLPAPER
-#include "festival-wallpaper.h"
-#endif
#include "wallpaper-ui-service-main.h"
-#define EXPORT_PUBLIC __attribute__ ((visibility ("default")))
-
-//#define WALLPAPER_FILE_PATH_LOCK "/opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper/lockscreen.jpg"
-//#define WALLPAPER_FILE_PATH_HOME "/opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper/homescreen.jpg"
-//#define WALLPAPER_FILE_PATH_HOME_N_LOCK "/opt/usr/apps/org.tizen.wallpaper-ui-service/data/wallpaper/home_n_lock.jpg"
#define WALLPAPER_FILE_PATH_LOCK "/opt/usr/share/lockscreen/wallpaper_list/lockscreen.jpg"
#define WALLPAPER_FILE_PATH_HOME "/opt/usr/share/lockscreen/wallpaper_list/homescreen.jpg"
#define WALLPAPER_FILE_PATH_HOME_N_LOCK "/opt/usr/share/lockscreen/wallpaper_list/home_n_lock.jpg"
-#define CHANGEABLE_COLOR_TABLE_PATH "/usr/apps/org.tizen.wallpaper-ui-service-lite/shared/res/tables/org.tizen.wallpaper-ui-service_color.xml"
-#define CHANGEABLE_FONT_TABLE_PATH "/usr/apps/org.tizen.wallpaper-ui-service-lite/shared/res/tables/org.tizen.wallpaper-ui-service_font.xml"
-#define WALLPAPER_TXT_FILE "/opt/usr/share/lockscreen/wallpaper_list/lockscreen_selected_images.txt"
-
-static Ea_Theme_Color_Table *_color_table = NULL;
-static Eina_List *_font_table = NULL;
static bool flag_view_exist = false;
#define DBUS_HOME_BUS_NAME "org.tizen.coreapps.home"
@@ -67,14 +48,17 @@ static bool flag_view_exist = false;
#define DBUS_HOME_RAISE_INTERFACE DBUS_HOME_BUS_NAME".raise"
#define DBUS_HOME_RAISE_MEMBER "homeraise"
+static bool _g_is_system_init = false;
+
/**
* The event process when win object is destroyed
*/
-static char *_strerror_db(int error)
+static char *_str_error_db(int error)
{
- switch(error)
- {
+ WALLPAPERUI_TRACE_BEGIN;
+
+ switch (error){
case MEDIA_CONTENT_ERROR_INVALID_PARAMETER:
return "Invalid parameter";
case MEDIA_CONTENT_ERROR_OUT_OF_MEMORY :
@@ -87,15 +71,12 @@ static char *_strerror_db(int error)
snprintf(buf, sizeof(buf), "Error Code=%d", error);
return buf;
}
-
}
+ WALLPAPERUI_TRACE_END;
}
-
-static bool _g_is_system_init = false;
-
-static void essential_system_db_init(void)
+static void _essential_system_db_init(void)
{
- WALLPAPERUI_DBG("essential_system_db_init begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
if (_g_is_system_init == true) {
WALLPAPERUI_ERR("_g_is_system_init == true");
@@ -107,11 +88,12 @@ static void essential_system_db_init(void)
if (media_content_connect() != MEDIA_CONTENT_ERROR_NONE) {
WALLPAPERUI_ERR ("media_content_connect is FAILED .....");
}
+ WALLPAPERUI_TRACE_END;
}
-static void essential_system_db_deinit(void)
+static void _essential_system_db_destroy(void)
{
- WALLPAPERUI_DBG("essential_system_db_deinit begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
if (_g_is_system_init == false) {
WALLPAPERUI_ERR("_g_is_system_init == false");
@@ -121,55 +103,63 @@ static void essential_system_db_deinit(void)
WALLPAPERUI_DBG("media_content_disconnect");
media_content_disconnect();
+ WALLPAPERUI_TRACE_END;
}
-bool wallpaper_db_create(void)
+static bool _wallpaper_db_create(void)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
int ret = MEDIA_CONTENT_ERROR_NONE;
ret = media_content_connect();
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
- WALLPAPERUI_ERR("media_content_connect is failed, err:%s", _strerror_db(ret));
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ WALLPAPERUI_ERR("media_content_connect is failed, err:%s", _str_error_db(ret));
return false;
}
+ WALLPAPERUI_TRACE_END;
return true;
}
-bool wallpaper_db_destroy(void)
+static bool _wallpaper_db_destroy(void)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
int ret = MEDIA_CONTENT_ERROR_NONE;
ret = media_content_disconnect();
- if(ret != MEDIA_CONTENT_ERROR_NONE)
- {
- WALLPAPERUI_ERR("media_content_disconnect is failed, err:%s", _strerror_db(ret));
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ WALLPAPERUI_ERR("media_content_disconnect is failed, err:%s", _str_error_db(ret));
return false;
}
+ WALLPAPERUI_TRACE_END;
return true;
}
-void reply_to_sender(void* data,int result)
+static void _reply_to_sender(void* data,int result)
{
+ WALLPAPERUI_TRACE_BEGIN;
ret_if(data == NULL);
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
app_control_h svc;
- if(app_control_create(&svc) == 0)
- {
+ if (app_control_create(&svc) == 0) {
WALLPAPERUI_DBG("reply to caller :: app_control_reply_to_launch_request(%d)",result);
app_control_reply_to_launch_request(svc, ad->service, result);
app_control_destroy(svc);
}
+ WALLPAPERUI_TRACE_END;
}
static void _del_win(void *data, Evas_Object *obj, void *event)
{
- //app_efl_exit();
- elm_exit();
+ WALLPAPERUI_TRACE_BEGIN;
+
+ ui_app_exit();
}
+
static void _win_rot_changed_cb(void *data, Evas_Object *obj, void *event)
{
WALLPAPERUI_TRACE_BEGIN;
@@ -188,17 +178,6 @@ static void _win_rot_changed_cb(void *data, Evas_Object *obj, void *event)
WALLPAPERUI_TRACE_END;
}
-static void _disable_effect(Evas_Object *win)
-{
- Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
- unsigned int effect_state = 0;
- Ecore_X_Window xwin;
- xwin = elm_win_xwindow_get(win);
- ATOM_WINDOW_EFFECT_ENABLE = ecore_x_atom_get("_NET_CM_WINDOW_EFFECT_ENABLE");
- if (ATOM_WINDOW_EFFECT_ENABLE) {
- ecore_x_window_prop_card32_set(xwin, ATOM_WINDOW_EFFECT_ENABLE, &effect_state, 1);
- }
-}
static Evas_Object *_create_win(const char *name, bool transparent)
{
WALLPAPERUI_TRACE_BEGIN;
@@ -207,13 +186,11 @@ static Evas_Object *_create_win(const char *name, bool transparent)
eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
- if (eo)
- {
+ if (eo) {
elm_win_title_set(eo, name);
elm_win_conformant_set(eo,EINA_TRUE);
- if(transparent)
- {
+ if (transparent) {
elm_win_alpha_set(eo, EINA_TRUE);
// unsigned int opaqueVal = 1;
@@ -223,17 +200,17 @@ static Evas_Object *_create_win(const char *name, bool transparent)
}
evas_object_smart_callback_add(eo, "delete,request", _del_win, NULL);
- ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+
+ elm_win_screen_size_get(eo, NULL, NULL, &w, &h);
+
evas_object_resize(eo, w, h);
- if(transparent)
- {
+ if (transparent) {
_disable_effect(eo);
elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_HIDE);
- }
- else
- {
+ } else {
elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
+ elm_win_indicator_opacity_set(eo, ELM_WIN_INDICATOR_TRANSPARENT);
}
evas_object_show(eo);
@@ -243,10 +220,10 @@ static Evas_Object *_create_win(const char *name, bool transparent)
return eo;
}
-void _create_conformant(Evas_Object *win, Evas_Object *layout)
+static void _create_conformant(Evas_Object *win, Evas_Object *layout)
{
WALLPAPERUI_TRACE_BEGIN;
- ret_if(!win);
+ ret_if (!win);
Evas_Object *conform = elm_conformant_add(win);
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -265,64 +242,60 @@ void _create_conformant(Evas_Object *win, Evas_Object *layout)
WALLPAPERUI_TRACE_END;
}
-Evas_Object *_create_main_layout(Evas_Object *win, const char *edj_path, const char *group)
+static Evas_Object *_create_main_layout(Evas_Object *win, const char *edj_path, const char *group)
{
WALLPAPERUI_TRACE_BEGIN;
- retv_if(!win, NULL);
+ retv_if (!win, NULL);
Evas_Object *layout = NULL;
+
layout = elm_layout_add(win);
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- if(edj_path)
- {
+ if (edj_path) {
elm_layout_file_set(layout, edj_path, group);
- }
- else
- {
+ } else {
elm_layout_theme_set(layout, "layout", "application", "default");
}
_create_conformant(win, layout);
+ WALLPAPERUI_TRACE_END;
return layout;
}
-int copy_wallpaper_file(char* source, char* destination)
+
+HAPI int wallpaper_ui_service_copy_wallpaper_file(char* source, char* destination)
{
- if(source==NULL||destination==NULL)
- {
+ WALLPAPERUI_TRACE_BEGIN;
+
+ if (source == NULL || destination == NULL) {
WALLPAPERUI_ERR("file error");
return 0;
}
- if(ecore_file_exists(source)==EINA_FALSE)
- {
+
+ if (ecore_file_exists(source) == EINA_FALSE) {
WALLPAPERUI_ERR("source error %s",source);
return 0;
}
- /*if(ecore_file_exists(destination)==EINA_TRUE)
- {
- WALLPAPERUI_ERR("destination exist %s",destination);
- return 0;
- }*/
- if(strcmp(source, destination) != 0) {
+
+ if (strcmp(source, destination) != 0) {
ecore_file_remove(destination);
- if(EINA_FALSE == ecore_file_cp(source, destination))
- {
+ if (EINA_FALSE == ecore_file_cp(source, destination)) {
WALLPAPERUI_ERR("ecore_file_cp fail");
return 0;
}
}
- return 1;
-
+ WALLPAPERUI_TRACE_END;
+ return 1;
}
-int wallpaper_txt_write(char *filename, char *path_array)
+static int _wallpaper_txt_write(char *filename, char *path_array)
{
- WALLPAPERUI_DBG("wallpaper_txt_write begin\n");
+ WALLPAPERUI_TRACE_BEGIN;
+
FILE *fp = fopen(filename, "w");
- if(!fp)
- {
+ if (!fp) {
WALLPAPERUI_DBG("fopen wallpaper txt file failed.");
return -1;
}
@@ -334,158 +307,19 @@ int wallpaper_txt_write(char *filename, char *path_array)
}
fclose(fp);
- WALLPAPERUI_DBG("wallpaper_txt_write end\n");
+
+ WALLPAPERUI_TRACE_END;
return 0;
}
-void util_wallpaper_set(void *data)
+static void _wallpaper_dbus_destroy(void *data)
{
- wallpaper_ui_service_appdata *ad = data;
- ret_if(ad == NULL);
- ret_if(ad->color_popup_data.file_path == NULL);
- WALLPAPERUI_ERR("setas_type: %d, file_path: %s",ad->sel_popup_data.setas_type,ad->color_popup_data.file_path);
-
- char* filepath = NULL;
-
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- filepath = strdup(WALLPAPER_FILE_PATH_HOME);
- }
- else if (ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
- filepath = strdup(WALLPAPER_FILE_PATH_LOCK);
- }
- else
- {
- filepath = strdup(WALLPAPER_FILE_PATH_HOME_N_LOCK);
- }
-
- if(copy_wallpaper_file(ad->color_popup_data.file_path,filepath)==0)
- {
- if(filepath)
- {
- free(filepath);
- }
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- filepath = strdup("/opt/usr/share/settings/Wallpapers/Lock_default.png");
- }
- else
- {
- filepath = strdup("/opt/usr/share/settings/Wallpapers/Home_default.png");
- }
- }
-
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, filepath) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_set_value_string() failed");
- }
-// notification_status_message_post(dgettext(PKGNAME, "IDS_ST_POP_HOME_SCREEN_WALLPAPER_CHANGED_ABB"));
- if(ad->flag_home_from_default){
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 1);
- }else{
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 0);
- }
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPE");
- }
- else if (ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, filepath) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_set_value_string() failed");
- }
- vconf_set_int("db/wallpaper-service/on_off", 0);
-// notification_status_message_post(dgettext(PKGNAME, "IDS_ST_POP_LOCK_SCREEN_WALLPAPER_CHANGED_ABB"));
- WALLPAPERUI_ERR("lock wallpaper type%d %s",ad->lock_wallpaper_type);
- //vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, ad->lock_wallpaper_type);
- char *temp_path = strdup(filepath);
- wallpaper_txt_write(WALLPAPER_TXT_FILE, filepath);
- free(temp_path);
-
- int value = 0;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE,&value);
- if(value==WALLPAPER_TYPE_CP)
- {
-#if !DISABLE_CP_WALLPAPER
- int error = wallpaper_service_deactivate();
- if(error != 0) {
- WALLPAPERUI_DBG("wallpaper_service_deactivate fail.");
- }
-#endif
- }
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE WALLPAPER_TYPE_GALLERY");
-
- }
- else if (ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOME_N_LOCKSCREEN)
- {
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, filepath) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_set_value_string() failed");
- }
- if(system_settings_set_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, filepath) != SYSTEM_SETTINGS_ERROR_NONE)
- {
- WALLPAPERUI_ERR("system_settings_set_value_string() failed");
- }
- vconf_set_int("db/wallpaper-service/on_off", 0);
- WALLPAPERUI_ERR("lock wallpaper type%d %s",ad->lock_wallpaper_type);
- //vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, ad->lock_wallpaper_type);
-// notification_status_message_post(dgettext(PKGNAME, "IDS_ST_TPOP_HOME_AND_LOCK_SCREEN_WALLPAPER_CHANGED"));
- char *temp_path = strdup(filepath);
- wallpaper_txt_write(WALLPAPER_TXT_FILE, filepath);
- free(temp_path);
- if(ad->flag_home_from_default){
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 1);
- }else{
- vconf_set_bool(VCONFKEY_WALLPAPER_HOME_PREVIEW_WALLPAPER_IS_DEFAULT, 0);
- }
- WALLPAPERUI_DBG("Set VCONFKEY_WALLPAPER_HOME_WALLPAPE");
-
- int value = 0;
- vconf_get_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE,&value);
- if(value==WALLPAPER_TYPE_CP)
- {
-#if !DISABLE_CP_WALLPAPER
- int error = wallpaper_service_deactivate();
- if(error != 0) {
- WALLPAPERUI_DBG("wallpaper_service_deactivate fail.");
- }
-#endif
- }
-
- vconf_set_int(VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE, WALLPAPER_TYPE_GALLERY);
- WALLPAPERUI_DBG("Set VCONFKEY_LOCKSCREEN_WALLPAPER_TYPE WALLPAPER_TYPE_GALLERY");
- }
- else
- {
- WALLPAPERUI_ERR("setas type is NULL");
- }
-
- if(ad->sel_popup_data.setas_type==WALLPAPER_POPUP_SETAS_HOME_N_LOCKSCREEN ||
- ad->sel_popup_data.setas_type==WALLPAPER_POPUP_SETAS_HOMESCREEN)
- {
-#if !DISABLE_LOGING_WALLPAPER
- WALLPAPERUI_DBG("app logging");
- wallpaper_share_logging(USE_APP_FEATURE_SURVEY_URI, "org.tizen.wallpaper-ui-service","CHWP",NULL, NULL);
-#endif
- }
-
- sync();
+ WALLPAPERUI_TRACE_BEGIN;
- if(filepath!=NULL)
- {
- free(filepath);
- }
-}
-void wallpaper_dbus_fini(void *data)
-{
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- ret_if(ad == NULL);
+ ret_if (ad == NULL);
- if(ad->dbus_conn) {
+ if (ad->dbus_conn) {
if(ad->dbus_home_button_handler) {
e_dbus_signal_handler_del(ad->dbus_conn, ad->dbus_home_button_handler);
ad->dbus_home_button_handler = NULL;
@@ -495,309 +329,183 @@ void wallpaper_dbus_fini(void *data)
ad->dbus_conn = NULL;
}
+ WALLPAPERUI_TRACE_END;
}
-void wallpaper_dbus_init(void)
+static void _wallpaper_dbus_init(void)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
e_dbus_init();
+
+ WALLPAPERUI_TRACE_END;
}
-void wallpaper_set_dbus_handler(void *data)
+static void _wallpaper_set_dbus_handler(void *data)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- ret_if(ad == NULL);
+ ret_if (ad == NULL);
+
E_DBus_Connection *conn = NULL;
conn = e_dbus_bus_get(DBUS_BUS_SYSTEM);
- if(conn == NULL) {
+ if (conn == NULL) {
WALLPAPERUI_ERR("e_dbus_bus_get() failed");
return;
}
ad->dbus_conn = conn;
+ WALLPAPERUI_TRACE_END;
}
static void _home_button_clicked_cb(void *data, DBusMessage *msg)
{
- WALLPAPERUI_DBG("HOME CLICK");
+ WALLPAPERUI_TRACE_BEGIN;
+
extern int scale_resize_state;
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- ret_if(ad == NULL);
+ ret_if (ad == NULL);
- if(ad->sel_popup_data.launch_from == WALLPAPER_POPUP_FROM_HOME_SCREEN
- && ad->popup_type == WALLPAPER_POPUP_TYPE_SELECTION)
- {
- if(scale_resize_state==1)
- {
+ if (ad->sel_popup_data.launch_from == WALLPAPER_POPUP_FROM_HOME_SCREEN
+ && ad->popup_type == WALLPAPER_POPUP_TYPE_SELECTION) {
+ if (scale_resize_state == 1) {
WALLPAPERUI_ERR("Destroy wallpaper cancel");
return;
}
WALLPAPERUI_ERR("Destroy wallpaper");
elm_exit();
}
+
+ WALLPAPERUI_TRACE_END;
}
-void wallpaper_register_home_button_cb(void *data)
+static void _wallpaper_register_home_button_cb(void *data)
{
+ WALLPAPERUI_TRACE_BEGIN;
+
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
- ret_if(ad == NULL);
- ret_if(ad->dbus_conn == NULL);
+ ret_if (ad == NULL);
+ ret_if (ad->dbus_conn == NULL);
E_DBus_Signal_Handler *handler = NULL;
handler = e_dbus_signal_handler_add(ad->dbus_conn, NULL, "/Org/Tizen/Coreapps/home/raise",
"org.tizen.coreapps.home.raise", "homeraise",
_home_button_clicked_cb, ad);
- if(handler == NULL) {
+ if (handler == NULL) {
WALLPAPERUI_ERR("e_dbus_signal_handler_add() failed");
- wallpaper_dbus_fini(ad);
+ _wallpaper_dbus_destroy(ad);
return;
}
ad->dbus_home_button_handler = handler;
-}
-
-static Ecore_Timer *dead_timer = NULL;
-
-static Eina_Bool __festival_dead_timer_cb(void *data)
-{
- wallpaper_ui_service_appdata *ad = data;
-
- WALLPAPERUI_ERR("festival end : exit");
-
- if(ad->win != NULL)
- {
- WALLPAPERUI_ERR("main window alive : do not close");
- }
- else
- {
- elm_exit();
- }
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool __festival_idler_cb(void *data)
-{
- wallpaper_ui_service_appdata *ad = data;
- char* festival_type = NULL;
- app_control_get_extra_data(ad->service, EXTRA_KEY_FESTIVAL_TYPE, &festival_type);
-
- WALLPAPERUI_ERR("EXTRA_KEY_FESTIVAL_TYPE(%s)",festival_type);
- if(festival_type!=NULL)
- {
- if(strcmp(festival_type, EXTRA_DATA_FESTIVAL_CREATE)==0)
- {
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_CREATE;
- }
- else if(strcmp(festival_type, EXTRA_DATA_FESTIVAL_DELETE)==0)
- {
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_DELETE;
- }
- else
- {
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_TRIGGER;
- }
- free(festival_type);
- }
- else
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_TRIGGER;
-
- festival_wallpaper_handle(ad->service, ad);
-
- if(dead_timer) {
- ecore_timer_del(dead_timer);
- dead_timer = NULL;
- }
- dead_timer = ecore_timer_add(10, __festival_dead_timer_cb, ad);
-
- return ECORE_CALLBACK_CANCEL;
+ WALLPAPERUI_TRACE_END;
}
void* _register_view(app_control_h service, void *data)
{
WALLPAPERUI_TRACE_BEGIN;
- retv_if(!data, NULL);
+ retv_if (!data, NULL);
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata *)data;
retv_if(!ad, NULL);
- //char *request_msg = NULL;
-
- // get URL
-// char *output_url = NULL;
-// int ret = app_control_get_operation(service, &output_url);
-// WALLPAPERUI_DBG("LAUNCHED BY URL -- output_url %s ",output_url);
-// if(ret == APP_CONTROL_ERROR_NONE)
char* from = NULL;
char* popup_type = NULL;
char* setas = NULL;
app_control_get_extra_data(service, EXTRA_KEY_POPUP_TYPE, &popup_type);
- if(popup_type!=NULL)
+
+ if (popup_type != NULL) {
WALLPAPERUI_ERR("popup_type %s",popup_type);
- if(popup_type!=NULL)
- {
- if(strcmp(popup_type, POPUP_TYPE_COLOR_KEY)==0)
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_THEME;
- }
- else if(strcmp(popup_type, POPUP_TYPE_FESTIVAL)==0)
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_FESTIVAL;
- }
- else
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_SELECTION;
- }
- free(popup_type);
}
- else
- {
+
+ if (popup_type != NULL) {
+ ad->popup_type = WALLPAPER_POPUP_TYPE_SELECTION;
+
+ free(popup_type);
+ } else {
ad->popup_type = WALLPAPER_POPUP_TYPE_SELECTION;
}
app_control_get_extra_data(service, EXTRA_FROM_KEY, &from);
WALLPAPERUI_ERR("from %s",from);
- if(from!=NULL)
- {
- if(strcmp(from,"Homescreen")==0)
- {
+ if (from!=NULL) {
+ if(strcmp(from,"Homescreen") == 0) {
ad->sel_popup_data.launch_from = WALLPAPER_POPUP_FROM_HOME_SCREEN;
- }
- else if(strcmp(from,"Setting")==0)
- {
+ } else if(strcmp(from,"Setting")==0) {
ad->sel_popup_data.launch_from = WALLPAPER_POPUP_FROM_SETTING;
- }
- else
- {
+ } else {
ad->sel_popup_data.launch_from = WALLPAPER_POPUP_FROM_LOCK_SCREEN;
}
free(from);
- }
- else
- {
+ } else {
ad->sel_popup_data.launch_from = WALLPAPER_POPUP_FROM_GALLERY;
}
app_control_get_extra_data(service, EXTRA_KEY_SETAS, &setas);
- if(setas == NULL)
+ if (setas == NULL) {
WALLPAPERUI_ERR("setas (%s) failed", setas);
+ }
- if(setas != NULL)
- {
+ if (setas != NULL) {
WALLPAPERUI_DBG("setas is (%s)", setas);
- if(strcmp(setas, EXTRA_DATA_HOMESCREEN) == 0)
- {
+ if (strcmp(setas, EXTRA_DATA_HOMESCREEN) == 0) {
ad->sel_popup_data.setas_type = WALLPAPER_POPUP_SETAS_HOMESCREEN;
- }
- else if(strcmp(setas, EXTRA_DATA_LOCKSCREEN) == 0)
- {
+ } else if(strcmp(setas, EXTRA_DATA_LOCKSCREEN) == 0) {
char* wallpaper_type = NULL;
ad->sel_popup_data.setas_type = WALLPAPER_POPUP_SETAS_LOCKSCREEN;
app_control_get_extra_data(service, EXTRA_KEY_WALLPAPER_TYPE, &wallpaper_type);
- if(wallpaper_type!=NULL)
- {
+ if (wallpaper_type != NULL) {
WALLPAPERUI_ERR("wallpaper_type (%s) failed", wallpaper_type);
- if(strcmp(wallpaper_type, EXTRA_DATA_WP_DEFAULT) == 0)
- {
- ad->lock_wallpaper_type = WALLPAPER_TYPE_DEFAULLT;
- }
- else if(strcmp(wallpaper_type, EXTRA_DATA_WP_MULTI) == 0)
- {
+ if(strcmp(wallpaper_type, EXTRA_DATA_WP_DEFAULT) == 0) {
+ ad->lock_wallpaper_type = WALLPAPER_TYPE_DEFAULT;
+ } else if(strcmp(wallpaper_type, EXTRA_DATA_WP_MULTI) == 0) {
ad->lock_wallpaper_type = WALLPAPER_TYPE_MULTIPLE;
- }
- else if(strcmp(wallpaper_type, EXTRA_DATA_WP_CP) == 0)
- {
- ad->lock_wallpaper_type = WALLPAPER_TYPE_CP;
- }
- else if(strcmp(wallpaper_type, EXTRA_DATA_WP_FESTIVAL) == 0)
- {
- ad->lock_wallpaper_type = WALLPAPER_TYPE_FESTIVAL;
- }
- else
- {
+ } else {
ad->lock_wallpaper_type = WALLPAPER_TYPE_GALLERY;
}
free(wallpaper_type);
- }
- else
- {
+ } else {
ad->lock_wallpaper_type = WALLPAPER_TYPE_GALLERY;
}
-
- }
- else
- {
+ }else {
ad->sel_popup_data.setas_type = WALLPAPER_POPUP_SETAS_HOME_N_LOCKSCREEN;
}
free(setas);
- }
- else
- {
+ } else {
WALLPAPERUI_ERR("app_control_get_extra_data(%s) failed", EXTRA_KEY_SETAS);
ad->sel_popup_data.setas_type = WALLPAPER_POPUP_SETAS_LOCKSCREEN;
}
- if(ad->popup_type == WALLPAPER_POPUP_TYPE_SELECTION)
- {
-
+ if(ad->popup_type == WALLPAPER_POPUP_TYPE_SELECTION) {
ad->sel_popup_data.win_main = ad->win;
-#if 0
- if (elm_win_wm_rotation_supported_get(ad->win))
- {
- if(ad->sel_popup_data.launch_from==WALLPAPER_POPUP_FROM_HOME_SCREEN)
- {
- const int rots[4] = { APP_DEVICE_ORIENTATION_0,
- -1,
- -1,
- -1 };
- elm_win_wm_rotation_available_rotations_set(ad->win, rots, 4);
- }
- else
- {
- const int rots[4] = { APP_DEVICE_ORIENTATION_0,
- APP_DEVICE_ORIENTATION_90,
- APP_DEVICE_ORIENTATION_180,
- APP_DEVICE_ORIENTATION_270 };
- elm_win_wm_rotation_available_rotations_set(ad->win, rots, 4);
- }
- }
- evas_object_smart_callback_add(ad->win, "wm,rotation,changed", _win_rot_changed_cb, NULL);
-#endif
+
//popup_wallpaper_main_create_view(data);
wallpaper_main_create_view(data);
- }
- else if (ad->popup_type == WALLPAPER_POPUP_TYPE_THEME)
- {
-
+ } else if (ad->popup_type == WALLPAPER_POPUP_TYPE_THEME) {
// WALLPAPERUI_ERR("EXTRA_FROM_KEY(%s) failed", from);
-
char *file_name = NULL;
app_control_get_extra_data(service, EXTRA_KEY_FILE, &file_name);
- if(file_name == NULL)
- {
+ if (file_name == NULL) {
WALLPAPERUI_ERR("app_control_get_extra_data(%s) failed", EXTRA_KEY_FILE);
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &file_name) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ if (ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_LOCKSCREEN) {
+ if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &file_name) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
- }
- else
- {
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &file_name) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ } else {
+ if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &file_name) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
}
- if(file_name == NULL)
- {
+
+ if (file_name == NULL) {
WALLPAPERUI_ERR("CIRITICAL ERROR : wallpaper file is NULL");
elm_exit();
return NULL;
@@ -805,89 +513,14 @@ void* _register_view(app_control_h service, void *data)
}
ad->color_popup_data.file_path = strdup(file_name);
free(file_name);
- if(ad->color_popup_data.file_path == NULL)
- {
+ if (ad->color_popup_data.file_path == NULL) {
WALLPAPERUI_ERR("CIRITICAL ERROR : strdup() failed");
// elm_exit();
}
- int value = 0;
- vconf_get_bool(VCONFKEY_SETAPPL_WALLPAPER_APPLY_COLORTHEME_BOOL,&value);
- if(value == 1 && ad->sel_popup_data.setas_type != WALLPAPER_POPUP_SETAS_LOCKSCREEN)
- {
-#if 0
- if (elm_win_wm_rotation_supported_get(ad->win))
- {
- if(ad->sel_popup_data.launch_from==WALLPAPER_POPUP_FROM_HOME_SCREEN)
- {
- const int rots[4] = { APP_DEVICE_ORIENTATION_0,
- -1,
- -1,
- -1 };
- elm_win_wm_rotation_available_rotations_set(ad->win, rots, 4);
- }
- else
- {
- const int rots[4] = { APP_DEVICE_ORIENTATION_0,
- APP_DEVICE_ORIENTATION_90,
- APP_DEVICE_ORIENTATION_180,
- APP_DEVICE_ORIENTATION_270 };
- elm_win_wm_rotation_available_rotations_set(ad->win, rots, 4);
- }
- }
- evas_object_smart_callback_add(ad->win, "wm,rotation,changed", _win_rot_changed_cb, NULL);
-#endif
- if(popup_color_theme_util_create_view(data) == NULL) {
- WALLPAPERUI_ERR("popup_color_theme_util_create_view() failed");
- elm_exit();
- }
- }
- else
- {
-// WALLPAPERUI_DBG("VCONFKEY_SETAPPL_WALLPAPER_APPLY_COLORTHEME_BOOL is not set : bg_file set");
- if(ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOMESCREEN ||
- ad->sel_popup_data.setas_type == WALLPAPER_POPUP_SETAS_HOME_N_LOCKSCREEN)
- {
- ad->flag_home_from_default = 0;
- }
- util_wallpaper_set(data);
- reply_to_sender(data,APP_CONTROL_RESULT_SUCCEEDED);
- elm_exit();
- }
}
-#if !DISABLE_FESTIVAL_WALLPAPER
- else if (ad->popup_type == WALLPAPER_POPUP_TYPE_FESTIVAL)
- {
- /*char* festival_type = NULL;
- app_control_get_extra_data(service, EXTRA_KEY_FESTIVAL_TYPE, &festival_type);
-
- WALLPAPERUI_ERR("EXTRA_KEY_FESTIVAL_TYPE(%s)",festival_type);
-
- if(festival_type!=NULL)
- {
- if(strcmp(festival_type, EXTRA_DATA_FESTIVAL_CREATE)==0)
- {
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_CREATE;
- }
- else if(strcmp(festival_type, EXTRA_DATA_FESTIVAL_DELETE)==0)
- {
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_DELETE;
- }
- else
- {
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_TRIGGER;
- }
- free(festival_type);
- }
- else
- ad->festival_data.festival_type = WALLPAPER_FESTIVAL_TYPE_TRIGGER;
- festival_wallpaper_handle(service, ad);
- elm_exit();*/
-
- ecore_idler_add(__festival_idler_cb, ad);
- }
-#endif
+ WALLPAPERUI_TRACE_END;
return NULL;
}
@@ -897,31 +530,19 @@ void* _register_view(app_control_h service, void *data)
static void _app_terminate(void *data)
{
WALLPAPERUI_TRACE_BEGIN;
- ret_if(!data);
+ ret_if (!data);
+
wallpaper_ui_service_appdata *ad = data;
- wallpaper_dbus_fini(data);
- essential_system_db_deinit();
+ _wallpaper_dbus_destroy(data);
+ _essential_system_db_destroy();
WALLPAPERUI_DBG("fingerprint_manager_terminate!");
- wallpaper_db_destroy();
-
- /*free changeable table*/
- if (_color_table) {
- ea_theme_colors_unset(_color_table, EA_THEME_STYLE_LIGHT);
- ea_theme_color_table_free(_color_table);
- _color_table = NULL;
- }
-
- if (_font_table) {
- ea_theme_fonts_unset(_font_table);
- ea_theme_font_table_free(_font_table);
- _font_table = NULL;
- }
+ _wallpaper_db_destroy();
flag_view_exist = false;
- if(ad->pd) {
+ if (ad->pd) {
free(ad->pd);
ad->pd = NULL;
}
@@ -943,47 +564,15 @@ static bool _app_create(void *data)
{
WALLPAPERUI_TRACE_BEGIN;
- elm_app_base_scale_set(1.8);
-
- wallpaper_ui_service_appdata *ad = data;
-
- bindtextdomain(PKGNAME, "/usr/apps/org.tizen.wallpaper-ui-service-lite/res/locale");
-
- essential_system_db_init();
-#if 0
- /* create window */
- ad->win = _create_win("org.tizen.setting.wallpaper-ui-service", TRUE);
- if(ad->win == NULL)
- {
- WALLPAPERUI_DBG("Can't create window");
- return FALSE;
- }
-
- flag_view_exist = false;
- // not allow to rotate window, keeping portrait mode only
- //elm_win_wm_rotation_preferred_rotation_set(ad->win, -1);
-
-// UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_ENABLE);
- ad->evas = evas_object_evas_get(ad->win);
- ad->layout = _create_main_layout(ad->win, NULL, NULL);
+ elm_config_preferred_engine_set("opengl_x11");
+ elm_app_base_scale_set(2.4);
+ bindtextdomain(PKGNAME, "/usr/apps/org.tizen.wallpaper-ui-service/res/locale");
- ea_theme_changeable_ui_enabled_set(EINA_TRUE);
+ _essential_system_db_init();
- /* Begin - Changeable GUI setting */
- _color_table = ea_theme_color_table_new(CHANGEABLE_COLOR_TABLE_PATH);
- retv_if(NULL == _color_table, -1);
- ea_theme_colors_set(_color_table, EA_THEME_STYLE_LIGHT);
+ _wallpaper_db_create();
- _font_table = ea_theme_font_table_new(CHANGEABLE_FONT_TABLE_PATH);
- retv_if(NULL == _font_table, -1);
- ea_theme_fonts_set(_font_table);
-
- //vconf_notify_key_changed(VCONFKEY_SETAPPL_CHANGE_UI_THEME_INT, _theme_changed_cb, NULL);
- //vconf_notify_key_changed(VCONFKEY_DBF_WEATHER_SHOW_CURRENT_CITY, _use_my_location_changed_cb, NULL);
- /* End - Changeable GUI setting */
-#endif
- wallpaper_db_create();
WALLPAPERUI_TRACE_END;
return TRUE;
}
@@ -994,11 +583,9 @@ static bool _app_create(void *data)
static void _app_pause(void *data)
{
WALLPAPERUI_TRACE_BEGIN;
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata*)data;
-
char *value = NULL;
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+
+ if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
WALLPAPERUI_DBG("value = %s", value);
@@ -1012,36 +599,20 @@ static void _app_resume(void *data)
{
WALLPAPERUI_TRACE_BEGIN;
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata*)data;
-
char *value = NULL;
- if(system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE)
- {
+ Evas_Coord w;
+ Evas_Coord h;
+
+ if (system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &value) != SYSTEM_SETTINGS_ERROR_NONE) {
WALLPAPERUI_ERR("system_settings_get_value_string() failed");
}
WALLPAPERUI_DBG("value = %s", value);
- //Resize the box Fix PLM issue P141020-05079
- Evas_Coord w, h;
evas_object_geometry_get(ad->main_layout, NULL, NULL, &w, &h);
WALLPAPERUI_DBG("main_layout W = %d, H = %d", w, h);
- if(ad->pd && ad->box) {
- WALLPAPERUI_DBG("ad->pd && ad->box");
- evas_object_size_hint_min_set(ad->pd->page[0], w, h);
- evas_object_size_hint_min_set(ad->pd->page[1], w, h);
- elm_scroller_page_size_set(ad->pd->scroller, w, h);
-
- elm_box_unpack_all(ad->box);
-
- elm_box_horizontal_set(ad->box, EINA_TRUE);
- elm_object_content_set(ad->pd->scroller, ad->box);
- evas_object_show(ad->box);
-
- elm_box_pack_end(ad->box, ad->pd->page[0]);
- elm_box_pack_end(ad->box, ad->pd->page[1]);
- evas_object_show(ad->box);
- }
+ WALLPAPERUI_TRACE_END;
}
/**
@@ -1050,7 +621,8 @@ static void _app_resume(void *data)
static Eina_Bool _wallpaper_window_transient_cb(void *userp, int type, void *event)
{
- WALLPAPERUI_DBG("transieng_cb");
+ WALLPAPERUI_TRACE_BEGIN;
+
Ecore_X_Event_Window_Hide *ev;
wallpaper_ui_service_appdata *ad = userp;
@@ -1065,11 +637,12 @@ static Eina_Bool _wallpaper_window_transient_cb(void *userp, int type, void *eve
return ECORE_CALLBACK_RENEW;
}
- if(ev->win == ad->caller_win_id) {
+ if (ev->win == ad->caller_win_id) {
elm_exit();
return ECORE_CALLBACK_CANCEL;
}
+ WALLPAPERUI_TRACE_END;
return ECORE_CALLBACK_RENEW;
}
@@ -1087,87 +660,34 @@ static void _app_reset(app_control_h service, void *data)
// clone service
app_control_clone(&(ad->service), service);
- if(popup_type!=NULL)
- {
- if(strcmp(popup_type, POPUP_TYPE_COLOR_KEY)==0)
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_THEME;
- }
- else if(strcmp(popup_type, POPUP_TYPE_FESTIVAL)==0)
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_FESTIVAL;
- if(dead_timer) {
- ecore_timer_del(dead_timer);
- dead_timer = NULL;
- }
- }
- else
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_SELECTION;
- }
- }
- else
- {
- ad->popup_type = WALLPAPER_POPUP_TYPE_SELECTION;
- }
+ ad->popup_type = WALLPAPER_POPUP_TYPE_SELECTION;
- if(ad->win!=NULL&&ad->popup_type == WALLPAPER_POPUP_TYPE_SELECTION)
- {
+ if(ad->win!=NULL&&ad->popup_type == WALLPAPER_POPUP_TYPE_SELECTION) {
WALLPAPERUI_DBG("ALREADY EXIST");
return;
// evas_object_del(ad->win);
// ad->win = NULL;
}
- if(ad->popup_type==WALLPAPER_POPUP_TYPE_THEME)
- {
+ if (ad->popup_type == WALLPAPER_POPUP_TYPE_THEME) {
bTransparent = 1;
}
- if(ad->popup_type!=WALLPAPER_POPUP_TYPE_FESTIVAL)
- {
- /* create window */
- ad->win = _create_win("org.tizen.setting.wallpaper-ui-service", bTransparent);
- if(ad->win == NULL)
- {
- WALLPAPERUI_DBG("Can't create window");
- return FALSE;
- }
-
- flag_view_exist = false;
-
- ad->evas = evas_object_evas_get(ad->win);
- ad->layout = _create_main_layout(ad->win, NULL, NULL);
-
-
- ea_theme_changeable_ui_enabled_set(EINA_TRUE);
+ /* create window */
+ ad->win = _create_win("org.tizen.setting.wallpaper-ui-service", bTransparent);
+ if(ad->win == NULL)
+ {
+ WALLPAPERUI_DBG("Can't create window");
+ return FALSE;
+ }
- /* Begin - Changeable GUI setting */
- _color_table = ea_theme_color_table_new(CHANGEABLE_COLOR_TABLE_PATH);
- retv_if(NULL == _color_table, -1);
- ea_theme_colors_set(_color_table, EA_THEME_STYLE_LIGHT);
+ flag_view_exist = false;
- _font_table = ea_theme_font_table_new(CHANGEABLE_FONT_TABLE_PATH);
- retv_if(NULL == _font_table, -1);
- ea_theme_fonts_set(_font_table);
+ ad->evas = evas_object_evas_get(ad->win);
+ ad->layout = _create_main_layout(ad->win, NULL, NULL);
- unsigned int parent_xwin_id = 0;
- app_control_get_window(service, &parent_xwin_id);
- WALLPAPERUI_DBG("parent_xwin_id : %d", parent_xwin_id);
+ elm_theme_extension_add(NULL, EDJDIR"/button_customized_theme.edj");
- if(parent_xwin_id) {
- WALLPAPERUI_DBG("parent_xwin_id : %d", parent_xwin_id);
- ad->caller_win_id = parent_xwin_id;
- ad->wallpaper_win_id = elm_win_xwindow_get(ad->win);
-
- WALLPAPERUI_DBG("wallpaper_win_id : %d", ad->wallpaper_win_id);
-
- ecore_x_icccm_transient_for_set(ad->wallpaper_win_id, ad->caller_win_id);
- ecore_x_window_client_manage(ad->caller_win_id);
-
- ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, _wallpaper_window_transient_cb, ad);
- }
- }
if(ad->win && flag_view_exist && popup_type && ad->popup_type==WALLPAPER_POPUP_TYPE_SELECTION){
elm_win_activate(ad->win);
}else {
@@ -1175,175 +695,98 @@ static void _app_reset(app_control_h service, void *data)
flag_view_exist = true;
}
- wallpaper_dbus_init();
- wallpaper_set_dbus_handler(ad);
- wallpaper_register_home_button_cb(ad);
+ _wallpaper_dbus_init();
+ _wallpaper_set_dbus_handler(ad);
+ _wallpaper_register_home_button_cb(ad);
if(popup_type) {
free(popup_type);
}
+ WALLPAPERUI_TRACE_END;
}
static void update_text(void *data)
{
- wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata*) data;
+ WALLPAPERUI_TRACE_BEGIN;
+ wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata*) data;
ret_if(ad == NULL);
- /* home & lockscreen tap to preview*/
- if(ad && ad->pd && ad->pd->page[0]) {
- elm_object_translatable_part_text_set(ad->pd->page[0], "text_tap", APP_STRING("IDS_LCKSCN_NPBODY_TAP_TO_PREVIEW"));
- }
- if(ad && ad->pd && ad->pd->page[1]) {
- elm_object_translatable_part_text_set(ad->pd->page[1], "text_tap", APP_STRING("IDS_LCKSCN_NPBODY_TAP_TO_PREVIEW"));
- }
-
- //cancel popup exist
- if(ad->popup) {
- elm_object_translatable_text_set(ad->popup, APP_STRING("IDS_LCKSCN_POP_ALL_CHANGES_WILL_BE_DISCARDED"));
- elm_object_translatable_part_text_set(ad->popup, "title,text", APP_STRING("IDS_LCKSCN_HEADER_DISCARD_CHANGES_ABB"));
-
- Evas_Object *btn = elm_object_part_content_get(ad->popup, "button1");
- if(btn) {
- elm_object_translatable_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_CANCEL"));
- }
-
- btn = elm_object_part_content_get(ad->popup, "button2");
- if(btn){
- elm_object_translatable_text_set(btn, APP_STRING("IDS_LCKSCN_BUTTON_DISCARD"));
- }
- }
+ Evas_Object *cancel_button;
+ Evas_Object *done_button;
+ Evas_Object *obj;
- if(ad->main_nf_it) {
+ if (ad->main_nf_it) {
elm_object_item_text_set(ad->main_nf_it, APP_STRING("IDS_LCKSCN_MBODY_WALLPAPERS"));
Evas_Object *cancel_button = elm_object_item_part_content_get(ad->main_nf_it, "title_left_text_btn");
- if(cancel_button) {
+ if (cancel_button) {
elm_object_text_set(cancel_button, APP_STRING("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"));
}
Evas_Object *done_button = elm_object_item_part_content_get(ad->main_nf_it, "title_right_text_btn");
- if(done_button) {
- elm_object_text_set(done_button, APP_STRING("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
- }
- }
-
- if(ad->default_nf_it) {
- if(ad->pd != NULL && ad->pd->current_page == 0){
- elm_object_item_text_set(ad->default_nf_it, APP_STRING("IDS_LCKSCN_MBODY_WALLPAPERS"));
- }else{
- Evas_Object *layout = elm_object_item_part_content_get(ad->default_nf_it, "elm.swallow.content");
- if(layout){
- elm_object_translatable_part_text_set(layout, "text", APP_STRING("IDS_ST_HEADER_SELECT_ALL_ABB2"));
- }
- }
-
- Evas_Object *cancel_button = elm_object_item_part_content_get(ad->default_nf_it, "title_left_text_btn");
- if(cancel_button) {
- elm_object_text_set(cancel_button, APP_STRING("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"));
- }
- Evas_Object *done_button = elm_object_item_part_content_get(ad->default_nf_it, "title_right_text_btn");
- if(done_button) {
- elm_object_text_set(done_button, APP_STRING("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
- }
- }
-
- if(ad->sel_nf_it) {
- Evas_Object *cancel_button = elm_object_item_part_content_get(ad->sel_nf_it, "title_left_text_btn");
- if(cancel_button) {
- elm_object_text_set(cancel_button, APP_STRING("IDS_TPLATFORM_ACBUTTON_CANCEL_ABB"));
- }
- Evas_Object *done_button = elm_object_item_part_content_get(ad->sel_nf_it, "title_right_text_btn");
- if(done_button) {
+ if (done_button) {
elm_object_text_set(done_button, APP_STRING("IDS_TPLATFORM_ACBUTTON_DONE_ABB"));
}
}
- if(ad->main_layout) {
- elm_object_translatable_part_text_set(ad->main_layout, "text_home", APP_STRING("IDS_LCKSCN_BUTTON_HOME_SCREEN_ABB"));
- elm_object_translatable_part_text_set(ad->main_layout, "text_gallery", APP_STRING("IDS_LCKSCN_BUTTON_LOCK_SCREEN_ABB2"));
- edje_object_signal_emit(elm_layout_edje_get(ad->main_layout), "text_home_default", "elm");
- edje_object_signal_emit(elm_layout_edje_get(ad->main_layout), "text_gallery_dim", "elm");
- }
-
- if(ad->lock_gallery_icon_layout){
- elm_object_translatable_part_text_set(ad->lock_gallery_icon_layout, "text", APP_STRING("IDS_LCKSCN_BODY_GALLERY"));
- }
- if(ad->home_gallery_icon_layout){
- elm_object_translatable_part_text_set(ad->home_gallery_icon_layout, "text", APP_STRING("IDS_LCKSCN_BODY_GALLERY"));
- }
-
- if(ad->pd){
- Evas_Object *obj = elm_object_part_content_get(ad->pd->page[0], "page_default_wallpaper_icon");
- if(obj){
- elm_object_translatable_part_text_set(obj, "text", APP_STRING("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
- }
-
- obj = elm_object_part_content_get(ad->pd->page[1], "page_default_wallpaper_icon");
- if(obj){
- elm_object_translatable_part_text_set(obj, "text", APP_STRING("IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"));
- }
-
- obj = elm_object_part_content_get(ad->pd->page[1], "page_my_interests_icon");
- if(obj){
- elm_object_translatable_part_text_set(obj, "text", APP_STRING("IDS_LCKSCN_BUTTON2_MY_INTERESTSM_PREFERRED_CATEGORIES_ABB"));
- }
- }
-
-#if !DISABLE_CP_WALLPAPER
- cp_wallpaper_popup_language_change();
-#endif
+ WALLPAPERUI_TRACE_END;
}
-static void _app_lang_changed(void *data)
+
+static void _app_lang_changed(app_event_info_h event_info, void *data)
{
WALLPAPERUI_TRACE_BEGIN;
- char *lang = NULL;
wallpaper_ui_service_appdata *ad = (wallpaper_ui_service_appdata*) data;
- if(ad == NULL)
- return;
+ ret_if(ad == NULL);
+
+ char *lang = NULL;
lang = vconf_get_str(VCONFKEY_LANGSET);
- if(lang)
- {
+ if (lang) {
elm_language_set((const char *)lang);
FREE(lang);
}
update_text(data);
+
+ WALLPAPERUI_TRACE_END;
}
/* End : Support to enable fingerprint lock */
-
-EXPORT_PUBLIC
-int main(int argc, char *argv[])
+HAPI int main(int argc, char *argv[])
{
WALLPAPERUI_TRACE_BEGIN;
int r = 0;
wallpaper_ui_service_appdata ad;
+ app_event_handler_h handlers[5] = {NULL,};
- app_event_callback_s ops = {
+ ui_app_lifecycle_callback_s ops = {
.create = _app_create,
.terminate = _app_terminate,
.pause = _app_pause,
.resume = _app_resume,
.app_control = _app_reset,
- .low_battery = NULL,
- .language_changed = _app_lang_changed,
- .region_format_changed = NULL,
- .device_orientation = NULL,
};
+ ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED,_app_lang_changed, NULL);
+
memset(&ad, 0x00, sizeof(wallpaper_ui_service_appdata));
- r = app_efl_main(&argc, &argv, &ops, &ad);
+ r = ui_app_main(argc, argv, &ops, &ad);
WALLPAPERUI_DBG("r = %d", r);
- if(r == -1)
- {
- WALLPAPERUI_ERR("app_efl_main() returns -1");
+ if (r == -1) {
+ WALLPAPERUI_ERR("ui_app_main() returns -1");
return -1;
}
+ WALLPAPERUI_TRACE_END;
return 0;
}
+
+/**
+* @}
+*/
+/* End of file */
+