From: Jiansong Jin Date: Wed, 5 Sep 2012 01:32:19 +0000 (+0900) Subject: Move icon definitions to seperate header file X-Git-Tag: 2.0_alpha~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20d469e3fdcaf630fa2f4b8bb1a1012bbfd23cd4;p=apps%2Fcore%2Fpreloaded%2Fgallery.git Move icon definitions to seperate header file Change-Id: I612b7d7a8b04db0e7903aa0fa16a144275d1c605 --- diff --git a/include/gallery.h b/include/gallery.h index 81bed44..a3e1259 100755 --- a/include/gallery.h +++ b/include/gallery.h @@ -101,24 +101,6 @@ extern "C" #define GL_GENLIST_ITEM_STYLE_SWEEP3 "mode/gallery/slide3" -/******** Image path ********/ - -#define GL_DEFAULT_THUMB_ICON IMAGEDIR"T01_Nocontents_broken.png" -#define GL_DB_DEFAULT_THUMB "/opt/data/file-manager-service/.thumb/thumb_default.png" -#define GL_LOCK_ICON IMAGEDIR"T01_icon_lock.png" - -#define Gl_VIDEO_PLAY_ICON IMAGEDIR"T01_btn_thumbnail_play.png" -#define GL_THUMB_BOOKMARK IMAGEDIR"T01_icon_thumbnail_bookmark.png" -#define GL_LIST_BOOKMARK IMAGEDIR"T01_list_icon_bookmark.png" - -#define GL_CBAR_ICON_EDIT IMAGEDIR"T01_controlbar_icon_edit.png" -#define GL_CBAR_ICON_CANCEL IMAGEDIR"T01_controlbar_icon_cancel.png" -#define GL_CBAR_ICON_DONE IMAGEDIR"T01_controlbar_icon_done.png" -#define GL_CBAR_ICON_DELETE IMAGEDIR"T01_controlbar_icon_delete.png" -#define GL_CBAR_ICON_SHARE IMAGEDIR"T01_controlbar_icon_share02.png" -#define GL_CBAR_ICON_MOVE IMAGEDIR"T01_controlbar_icon_move.png" -#define GL_CBAR_ICON_CAMERA IMAGEDIR"T01_controlbar_icon_camera.png" - /******** String ********/ /* MIME type */ diff --git a/include/util/gl-icons.h b/include/util/gl-icons.h new file mode 100755 index 0000000..5d23d2c --- /dev/null +++ b/include/util/gl-icons.h @@ -0,0 +1,38 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _GL_ICONS_H_ +#define _GL_ICONS_H_ + +/******** Image path ********/ + +#define GL_DEFAULT_THUMB_ICON IMAGEDIR"T01_Nocontents_broken.png" +#define GL_DB_DEFAULT_THUMB "/opt/data/file-manager-service/.thumb/thumb_default.png" +#define GL_LOCK_ICON IMAGEDIR"T01_icon_lock.png" + +#define Gl_VIDEO_PLAY_ICON IMAGEDIR"T01_btn_thumbnail_play.png" +#define GL_THUMB_BOOKMARK IMAGEDIR"T01_icon_thumbnail_bookmark.png" +#define GL_LIST_BOOKMARK IMAGEDIR"T01_list_icon_bookmark.png" + +#define GL_CBAR_ICON_EDIT IMAGEDIR"T01_controlbar_icon_edit.png" +#define GL_CBAR_ICON_CANCEL IMAGEDIR"T01_controlbar_icon_cancel.png" +#define GL_CBAR_ICON_DELETE IMAGEDIR"T01_controlbar_icon_delete.png" +#define GL_CBAR_ICON_SHARE IMAGEDIR"T01_controlbar_icon_share02.png" +#define GL_CBAR_ICON_MOVE IMAGEDIR"T01_controlbar_icon_move.png" +#define GL_CBAR_ICON_CAMERA IMAGEDIR"T01_controlbar_icon_camera.png" + +#endif + diff --git a/src/features/gl-albums.c b/src/features/gl-albums.c index a2ea83e..0d43f8a 100755 --- a/src/features/gl-albums.c +++ b/src/features/gl-albums.c @@ -28,6 +28,7 @@ #include "gl-progressbar.h" #include "gl-tile.h" #include "gl-strings.h" +#include "gl-icons.h" #include "gl-nocontents.h" #include "gl-notify.h" #ifdef _USE_ROTATE_BG diff --git a/src/features/gl-gridview.c b/src/features/gl-gridview.c index 865f963..f10426a 100755 --- a/src/features/gl-gridview.c +++ b/src/features/gl-gridview.c @@ -27,6 +27,7 @@ #include "gl-nocontents.h" #include "gl-notify.h" #include "gl-strings.h" +#include "gl-icons.h" #include "gl-thumb.h" #ifdef _USE_ROTATE_BG #include "gl-exif.h" diff --git a/src/features/gl-listview.c b/src/features/gl-listview.c index 135c778..7fe6253 100755 --- a/src/features/gl-listview.c +++ b/src/features/gl-listview.c @@ -30,6 +30,7 @@ #include "gl-progressbar.h" #include "gl-video.h" #include "gl-strings.h" +#include "gl-icons.h" #include "gl-popup.h" static void __gl_list_item_check_changed(void *data, Evas_Object * obj, void *event_info) diff --git a/src/util/gl-drm.c b/src/util/gl-drm.c index 7727865..f9900a3 100755 --- a/src/util/gl-drm.c +++ b/src/util/gl-drm.c @@ -19,6 +19,7 @@ #include "gallery.h" #include "gl-debug.h" #include "gl-drm.h" +#include "gl-icons.h" char *gl_drm_get_file_path(void *item) { diff --git a/src/util/gl-ui-util.c b/src/util/gl-ui-util.c index da74d95..0040d7c 100755 --- a/src/util/gl-ui-util.c +++ b/src/util/gl-ui-util.c @@ -32,6 +32,7 @@ #include "gl-popup.h" #include "gl-progressbar.h" #include "gl-strings.h" +#include "gl-icons.h" #include "gl-drm.h" #include "gl-nocontents.h" #include "gl-notify.h" diff --git a/src/widget/gl-popup.c b/src/widget/gl-popup.c index fd9645d..2bf561d 100755 --- a/src/widget/gl-popup.c +++ b/src/widget/gl-popup.c @@ -44,10 +44,7 @@ static Eina_Bool __gl_popup_timeout_cb(void *data) ad->popupinfo.del_timer = NULL; } - if (ad->popupinfo.popup) { - evas_object_del(ad->popupinfo.popup); - ad->popupinfo.popup = NULL; - } + GL_IF_DEL_OBJ(ad->popupinfo.popup); return ECORE_CALLBACK_CANCEL; } @@ -82,10 +79,7 @@ static void __gl_popup_del_resp_cb(void *data, Evas_Object *obj, gl_del_albums(ad); } - if (ad->popupinfo.popup) { - evas_object_del(ad->popupinfo.popup); - ad->popupinfo.popup = NULL; - } + GL_IF_DEL_OBJ(ad->popupinfo.popup); } static void _gl_popup_move_to_album(void *data) @@ -120,10 +114,7 @@ static void __gl_popup_del_video_resp_cb(void *data, Evas_Object *obj, if (!g_strcmp0(text, GL_STR_DELETE)) _gl_del_video(data); - if (ad->popupinfo.popup) { - evas_object_del(ad->popupinfo.popup); - ad->popupinfo.popup = NULL; - } + GL_IF_DEL_OBJ(ad->popupinfo.popup); } static void _gl_popup_resp_cb(void *data, Evas_Object *obj, void *event_info) @@ -170,14 +161,8 @@ static void _gl_popup_resp_cb(void *data, Evas_Object *obj, void *event_info) } } - if (ad->pbarinfo.pbar_popup) { - evas_object_del(ad->pbarinfo.pbar_popup); - ad->pbarinfo.pbar_popup = NULL; - } - if (ad->popupinfo.popup) { - evas_object_del(ad->popupinfo.popup); - ad->popupinfo.popup = NULL; - } + GL_IF_DEL_OBJ(ad->pbarinfo.pbar_popup); + GL_IF_DEL_OBJ(ad->popupinfo.popup); } static char *__gl_popup_list_get_text(void *data, Evas_Object *obj, const char *part) @@ -321,12 +306,9 @@ _gl_popup_move_cb(void *data, Evas_Object * obj, void *event_info) gl_dbg("Dest album path: %s", ad->albuminfo.path); - if (ad->popupinfo.popup) { - evas_object_del(ad->popupinfo.popup); - ad->popupinfo.popup = NULL; - } - _gl_popup_move_to_album(ad); + + GL_IF_DEL_OBJ(ad->popupinfo.popup); } static void @@ -341,16 +323,13 @@ _gl_popup_share_cb(void *data, Evas_Object * obj, void *event_info) g_strlcpy(ad->popupinfo.popup_item_label, (char *)data, GL_ALBUM_NAME_LEN_MAX); - if (ad->popupinfo.popup) { - evas_object_del(ad->popupinfo.popup); - ad->popupinfo.popup = NULL; - } - int view_mode = gl_get_view_mode(ad); if (view_mode == GL_VIEW_ALBUMS_EDIT) _gl_share_select_album(ad); else gl_share_select_item(ad); + + GL_IF_DEL_OBJ(ad->popupinfo.popup); } /* Append items to list in popup for 'Share' */ @@ -560,15 +539,13 @@ static Evas_Object *_gl_popup_set_box(Evas_Object *parent, return box; } -int -gl_popup_create_title_popup(void *data, gl_popup_mode mode, char *title, char *desc) +int gl_popup_create_title_popup(void *data, gl_popup_mode mode, char *title, char *desc) { GL_CHECK_VAL(data, -1); gl_appdata *ad = (gl_appdata *)data; gl_dbg(""); - if (ad->popupinfo.popup) - { + if (ad->popupinfo.popup) { gl_dbg("Delete existed popup."); evas_object_del(ad->popupinfo.popup); } @@ -625,8 +602,7 @@ gl_popup_create_title_popup(void *data, gl_popup_mode mode, char *title, char *d POPUP_FAILED: gl_dbgE("POPUP_FAILED"); - evas_object_del(popup); - ad->popupinfo.popup = NULL; + GL_IF_DEL_OBJ(ad->popupinfo.popup); return -1; } diff --git a/src/widget/gl-rotate-bg.c b/src/widget/gl-rotate-bg.c index f3fa9cd..5117751 100755 --- a/src/widget/gl-rotate-bg.c +++ b/src/widget/gl-rotate-bg.c @@ -19,6 +19,7 @@ #include "gl-rotate-bg.h" #include "gl-exif.h" #include "gl-debug.h" +#include "gl-icons.h" #define GL_ROTATE_BG_DATA_KEY "gl_bg_data" #define GL_ROTATE_BG_GROUP "gl_bg_layout" diff --git a/src/widget/gl-thumb.c b/src/widget/gl-thumb.c index 2bb8e7e..33d9f19 100755 --- a/src/widget/gl-thumb.c +++ b/src/widget/gl-thumb.c @@ -18,6 +18,7 @@ #include "gl-util.h" #include "gl-drm.h" #include "gl-strings.h" +#include "gl-icons.h" #ifdef _USE_ROTATE_BG #include "gl-rotate-bg.h" #include "gl-exif.h" diff --git a/src/widget/gl-video.c b/src/widget/gl-video.c index 68f6fd2..ac47f4a 100755 --- a/src/widget/gl-video.c +++ b/src/widget/gl-video.c @@ -19,6 +19,7 @@ #include "gl-util.h" #include "gl-drm.h" #include "gl-strings.h" +#include "gl-icons.h" #include "gl-progressbar.h" #ifdef _USE_ROTATE_BG #include "gl-rotate-bg.h" diff --git a/ug/ug-gallery-efl/include/gallery-efl.h b/ug/ug-gallery-efl/include/gallery-efl.h index 605e35d..ea7a3f3 100755 --- a/ug/ug-gallery-efl/include/gallery-efl.h +++ b/ug/ug-gallery-efl/include/gallery-efl.h @@ -44,15 +44,6 @@ extern "C" { #define GE_NAVIFRAME_STYLE_DEFAULT "gallery_efl/default" #define GE_CHECKBOX_STYLE_GRID "gallery_efl/grid" -#define GE_LOCK_ICON GE_IMAGES_DIR"T01_icon_lock.png" -#define GE_THUMB_FAVOR_ICON GE_IMAGES_DIR"T01_icon_thumbnail_favorite.png" -#define GE_THUMB_BOOKMARK GE_IMAGES_DIR"T01_icon_thumbnail_bookmark.png" -#define GE_DEFAULT_THUMB_ICON GE_IMAGES_DIR"T01_Nocontents_broken.png" -#define GE_CBAR_ICON_DONE GE_IMAGES_DIR"T01_controlbar_icon_done.png" -#define GE_SNS_ICON_PICASA GE_IMAGES_DIR"T01_Picasa.png" -#define GE_SNS_ICON_FACEBOOK GE_IMAGES_DIR"T01_Facebook.png" -#define GE_DB_DEFAULT_THUMB "/opt/data/file-manager-service/.thumb/thumb_default.png" - #define GE_ROOT_PATH_PHONE "/opt/media" #define GE_ROOT_PATH_MMC "/opt/storage/sdcard" diff --git a/ug/ug-gallery-efl/include/ge-icon.h b/ug/ug-gallery-efl/include/ge-icon.h new file mode 100755 index 0000000..46cd305 --- /dev/null +++ b/ug/ug-gallery-efl/include/ge-icon.h @@ -0,0 +1,29 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __GE_ICON_H__ +#define __GE_ICON_H__ + +#include "gallery-efl.h" + +#define GE_LOCK_ICON GE_IMAGES_DIR"T01_icon_lock.png" +#define GE_THUMB_BOOKMARK GE_IMAGES_DIR"T01_icon_thumbnail_bookmark.png" +#define GE_DEFAULT_THUMB_ICON GE_IMAGES_DIR"T01_Nocontents_broken.png" +#define GE_CBAR_ICON_DONE GE_IMAGES_DIR"T01_controlbar_icon_done.png" +#define GE_DB_DEFAULT_THUMB "/opt/data/file-manager-service/.thumb/thumb_default.png" + +#endif + diff --git a/ug/ug-gallery-efl/src/ge-albums.c b/ug/ug-gallery-efl/src/ge-albums.c index 8ad4c08..74c6ab2 100755 --- a/ug/ug-gallery-efl/src/ge-albums.c +++ b/ug/ug-gallery-efl/src/ge-albums.c @@ -22,6 +22,7 @@ #include "ge-drm.h" #include "ge-data.h" #include "ge-strings.h" +#include "ge-icon.h" #include "ge-tile.h" #include "ge-rotate-bg.h" diff --git a/ug/ug-gallery-efl/src/ge-drm.c b/ug/ug-gallery-efl/src/ge-drm.c index ad4064c..b036514 100755 --- a/ug/ug-gallery-efl/src/ge-drm.c +++ b/ug/ug-gallery-efl/src/ge-drm.c @@ -20,6 +20,7 @@ #include "ge-ui-util.h" #include "ge-debug.h" #include "ge-drm.h" +#include "ge-icon.h" int ge_drm_get_permtype(int gitem_type) { diff --git a/ug/ug-gallery-efl/src/ge-gridview.c b/ug/ug-gallery-efl/src/ge-gridview.c index 2f6b90f..3c325b7 100755 --- a/ug/ug-gallery-efl/src/ge-gridview.c +++ b/ug/ug-gallery-efl/src/ge-gridview.c @@ -21,6 +21,7 @@ #include "ge-ext-ug-load.h" #include "ge-data.h" #include "ge-strings.h" +#include "ge-icon.h" #include "ge-drm.h" #include "ge-exif.h" #include "ge-thumb.h" diff --git a/ug/ug-gallery-efl/src/ge-rotate-bg.c b/ug/ug-gallery-efl/src/ge-rotate-bg.c index 187bbf9..680edfe 100755 --- a/ug/ug-gallery-efl/src/ge-rotate-bg.c +++ b/ug/ug-gallery-efl/src/ge-rotate-bg.c @@ -19,6 +19,7 @@ #include "ge-rotate-bg.h" #include "ge-exif.h" #include "ge-debug.h" +#include "ge-icon.h" #define GE_ROTATE_BG_DATA_KEY "ge_bg_data" #define GE_ROTATE_BG_GROUP "ge_bg_layout" diff --git a/ug/ug-gallery-efl/src/ge-thumb.c b/ug/ug-gallery-efl/src/ge-thumb.c index 989341b..4adadae 100755 --- a/ug/ug-gallery-efl/src/ge-thumb.c +++ b/ug/ug-gallery-efl/src/ge-thumb.c @@ -18,6 +18,7 @@ #include "ge-util.h" #include "ge-drm.h" #include "ge-strings.h" +#include "ge-icon.h" #ifdef _USE_ROTATE_BG_GE #include "ge-rotate-bg.h" #include "ge-exif.h" diff --git a/ug/ug-gallery-efl/src/ge-ui-util.c b/ug/ug-gallery-efl/src/ge-ui-util.c index 8905ea5..3c21aba 100755 --- a/ug/ug-gallery-efl/src/ge-ui-util.c +++ b/ug/ug-gallery-efl/src/ge-ui-util.c @@ -22,7 +22,7 @@ #include "ge-debug.h" #include "ge-data.h" #include "ge-strings.h" - +#include "ge-icon.h" #define HOME_ALBUM_COVER_NUM 1 #define VIDEO_SHARE_NUM 1 @@ -57,7 +57,6 @@ static Eina_Bool __ge_popup_timeout_cb(void *data) ugd->del_timer = NULL; } - GE_IF_DEL_OBJ(ugd->popup); return ECORE_CALLBACK_CANCEL; }