Move icon definitions to seperate header file
authorJiansong Jin <jiansong.jin@samsung.com>
Wed, 5 Sep 2012 01:32:19 +0000 (10:32 +0900)
committerJiansong Jin <jiansong.jin@samsung.com>
Wed, 5 Sep 2012 01:32:19 +0000 (10:32 +0900)
Change-Id: I612b7d7a8b04db0e7903aa0fa16a144275d1c605

19 files changed:
include/gallery.h
include/util/gl-icons.h [new file with mode: 0755]
src/features/gl-albums.c
src/features/gl-gridview.c
src/features/gl-listview.c
src/util/gl-drm.c
src/util/gl-ui-util.c
src/widget/gl-popup.c
src/widget/gl-rotate-bg.c
src/widget/gl-thumb.c
src/widget/gl-video.c
ug/ug-gallery-efl/include/gallery-efl.h
ug/ug-gallery-efl/include/ge-icon.h [new file with mode: 0755]
ug/ug-gallery-efl/src/ge-albums.c
ug/ug-gallery-efl/src/ge-drm.c
ug/ug-gallery-efl/src/ge-gridview.c
ug/ug-gallery-efl/src/ge-rotate-bg.c
ug/ug-gallery-efl/src/ge-thumb.c
ug/ug-gallery-efl/src/ge-ui-util.c

index 81bed446a013a0f684ed9fa96a0b7e5c8e0d15d4..a3e1259d960305a5b41e75de091e039548f8d332 100755 (executable)
@@ -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 (executable)
index 0000000..5d23d2c
--- /dev/null
@@ -0,0 +1,38 @@
+/*\r
+  * Copyright 2012  Samsung Electronics Co., Ltd\r
+  *\r
+  * Licensed under the Flora License, Version 1.0 (the "License");\r
+  * you may not use this file except in compliance with the License.\r
+  * You may obtain a copy of the License at\r
+  *\r
+  *    http://www.tizenopensource.org/license\r
+  *\r
+  * Unless required by applicable law or agreed to in writing, software\r
+  * distributed under the License is distributed on an "AS IS" BASIS,\r
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  * See the License for the specific language governing permissions and\r
+  * limitations under the License.\r
+  */\r
+\r
+#ifndef _GL_ICONS_H_\r
+#define _GL_ICONS_H_\r
+\r
+/******** Image path ********/\r
+\r
+#define GL_DEFAULT_THUMB_ICON IMAGEDIR"T01_Nocontents_broken.png"\r
+#define GL_DB_DEFAULT_THUMB "/opt/data/file-manager-service/.thumb/thumb_default.png"\r
+#define GL_LOCK_ICON IMAGEDIR"T01_icon_lock.png"\r
+\r
+#define Gl_VIDEO_PLAY_ICON IMAGEDIR"T01_btn_thumbnail_play.png"\r
+#define GL_THUMB_BOOKMARK IMAGEDIR"T01_icon_thumbnail_bookmark.png"\r
+#define GL_LIST_BOOKMARK IMAGEDIR"T01_list_icon_bookmark.png"\r
+\r
+#define GL_CBAR_ICON_EDIT IMAGEDIR"T01_controlbar_icon_edit.png"\r
+#define GL_CBAR_ICON_CANCEL IMAGEDIR"T01_controlbar_icon_cancel.png"\r
+#define GL_CBAR_ICON_DELETE IMAGEDIR"T01_controlbar_icon_delete.png"\r
+#define GL_CBAR_ICON_SHARE IMAGEDIR"T01_controlbar_icon_share02.png"\r
+#define GL_CBAR_ICON_MOVE IMAGEDIR"T01_controlbar_icon_move.png"\r
+#define GL_CBAR_ICON_CAMERA IMAGEDIR"T01_controlbar_icon_camera.png"\r
+\r
+#endif\r
+\r
index a2ea83ee724dab9115a6a2b01dffb192371ef584..0d43f8af20c76aa6225bf34a0d1ca493f8473046 100755 (executable)
@@ -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
index 865f96385aecdd9c770f3e8f574aed54dea9f038..f10426aa15cccfce214725c2612ca254e967727e 100755 (executable)
@@ -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"
index 135c7785c97d7d8edc726606b6cd49012cae76b6..7fe6253a2c1a128cb2ddc7a4c915d99eb224e935 100755 (executable)
@@ -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)
index 7727865eed2d3525d7ffb57a51d6b501615a702b..f9900a3d4797b5c626001205cdc5e6a0b9260d38 100755 (executable)
@@ -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)
 {
index da74d9525a9c63f47c19cb483a450339cd287dc1..0040d7c8ce467f63873c1d85c46f38fb67eb8629 100755 (executable)
@@ -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"
index fd9645dca1258641a3a27334cdbd6c78fce1eab6..2bf561d5c4a7b521578cf411484f2f1231da1ed4 100755 (executable)
@@ -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;
 }
 
index f3fa9cd4f687ad61bc6df123302a88fad470c2b1..51177515663b1757eb4cbf4ffdcdf88cebc9bf5e 100755 (executable)
@@ -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"
index 2bb8e7eaf06aa197e39911d3bd98ed828f669938..33d9f196bb9f1d0ff9579b005e20c69fddc4ee3f 100755 (executable)
@@ -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"
index 68f6fd2530fcba14bd7fa5d9f322b6fd955467fb..ac47f4a5612f8c471a2a2efdabfac93f5bb125f4 100755 (executable)
@@ -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"
index 605e35da8b28ca12f1f35bd7f964f874fac5e564..ea7a3f3edca2a84920f08ec75ccfe0d7d15ba831 100755 (executable)
@@ -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 (executable)
index 0000000..46cd305
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+  * Copyright 2012  Samsung Electronics Co., Ltd\r
+  *\r
+  * Licensed under the Flora License, Version 1.0 (the "License");\r
+  * you may not use this file except in compliance with the License.\r
+  * You may obtain a copy of the License at\r
+  *\r
+  *    http://www.tizenopensource.org/license\r
+  *\r
+  * Unless required by applicable law or agreed to in writing, software\r
+  * distributed under the License is distributed on an "AS IS" BASIS,\r
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  * See the License for the specific language governing permissions and\r
+  * limitations under the License.\r
+  */\r
+\r
+#ifndef __GE_ICON_H__\r
+#define __GE_ICON_H__\r
+\r
+#include "gallery-efl.h"\r
+\r
+#define GE_LOCK_ICON GE_IMAGES_DIR"T01_icon_lock.png"\r
+#define GE_THUMB_BOOKMARK GE_IMAGES_DIR"T01_icon_thumbnail_bookmark.png"\r
+#define GE_DEFAULT_THUMB_ICON GE_IMAGES_DIR"T01_Nocontents_broken.png"\r
+#define GE_CBAR_ICON_DONE GE_IMAGES_DIR"T01_controlbar_icon_done.png"\r
+#define GE_DB_DEFAULT_THUMB "/opt/data/file-manager-service/.thumb/thumb_default.png"\r
+\r
+#endif\r
+\r
index 8ad4c080bb5dc86fdaff1e1cf7467dab5c954596..74c6ab29f5693b9305e64cbcaae9b65cd899026d 100755 (executable)
@@ -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"
 
index ad4064c4469670bdd3142c89b11ddca648eadac9..b036514af4e5caa0d70de0b8dc32207278469ba0 100755 (executable)
@@ -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)
 {
index 2f6b90f329b7c15f5b18c114d2f32aad2d5c053e..3c325b72f7e7d6c4db54c35313a2f257c934dad6 100755 (executable)
@@ -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"
index 187bbf9fe5b5f6102ee489aa991eb91ec7008e17..680edfe0be49922573be45db62224f39f4c63f28 100755 (executable)
@@ -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"
index 989341b54317f4ca49bfc92f7a8ce8ba5d502e28..4adadae34f4f0b18bc958e573f850681b7203e3a 100755 (executable)
@@ -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"
index 8905ea587233d179b19dcb16f5a686ae0663fb18..3c21ababe7a94fa26e8380e70bb61a49caa60275 100755 (executable)
@@ -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;
 }