GUI 3.0 - folder image 40/72740/2
authorYoungHun Cho <hoon.cho@samsung.com>
Thu, 2 Jun 2016 09:02:08 +0000 (18:02 +0900)
committerYoungHun Cho <hoon.cho@samsung.com>
Thu, 2 Jun 2016 09:03:54 +0000 (18:03 +0900)
Change-Id: I8b167696836a2c7375134b48e0802b1b58722dc6
Signed-off-by: YoungHun Cho <hoon.cho@samsung.com>
inc/apps_view.h
res/edje/apps_folder_icon.edc
res/images/folder_appicon_bg.png
res/images/folder_appicon_bg_impossible.png [changed mode: 0644->0755]
res/images/folder_appicon_bg_possible.png [changed mode: 0644->0755]
src/apps_data.c
src/apps_view.c

index a281ff1..88036b3 100755 (executable)
@@ -29,7 +29,7 @@ void apps_view_show(void);
 void apps_view_hide(void);
 void apps_view_show_anim(double pos);
 void apps_view_hide_anim(double pos);
-void apps_view_reroder(void);
+void apps_view_reorder(void);
 void apps_view_folder_reroder(void);
 void apps_view_update_folder_icon(app_data_t *item);
 
index 8b92b74..927f4be 100755 (executable)
@@ -49,34 +49,6 @@ collections {
                 aspect: 1.0 1.0;
                 aspect_preference: BOTH;
                 image {
-                    normal: "../res/images/folder_appicon_empty_bg.png";
-                }
-            }
-            description {
-                state: "item_count_1" 0.0;
-                inherit: "default" 0.0;
-                image {
-                    normal: "../res/images/folder_appicon_bg.png";
-                }
-            }
-            description {
-                state: "item_count_2" 0.0;
-                inherit: "default" 0.0;
-                image {
-                    normal: "../res/images/folder_appicon_bg.png";
-                }
-            }
-            description {
-                state: "item_count_3" 0.0;
-                inherit: "default" 0.0;
-                image {
-                    normal: "../res/images/folder_appicon_bg.png";
-                }
-            }
-            description {
-                state: "item_count_4" 0.0;
-                inherit: "default" 0.0;
-                image {
                     normal: "../res/images/folder_appicon_bg.png";
                 }
             }
@@ -119,34 +91,30 @@ collections {
             type: SWALLOW;
             description {
                 state: "default" 0.0;
-                rel1{relative: 0.325 0.325; to: SIZE_SETTER;}
-                rel2{relative: 0.675 0.675; to: SIZE_SETTER;}
+                rel1{relative: 0.185 0.185; to: SIZE_SETTER;}
+                rel2{relative: 0.485 0.485; to: SIZE_SETTER;}
                 aspect: 1.0 1.0;
                 aspect_preference: BOTH;
                 visible: 0;
             }
             description {
                 state: "item_count_1" 0.0;
-                rel1{relative: 0.325 0.325; to: SIZE_SETTER;}
-                rel2{relative: 0.675 0.675; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
             description {
                 state: "item_count_2" 0.0;
-                rel1{relative: 0.135 0.325; to: SIZE_SETTER;}
-                rel2{relative: 0.485 0.675; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
             description {
                 state: "item_count_3" 0.0;
-                rel1{relative: 0.185 0.185; to: SIZE_SETTER;}
-                rel2{relative: 0.485 0.485; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
             description {
                 state: "item_count_4" 0.0;
-                rel1{relative: 0.185 0.185; to: SIZE_SETTER;}
-                rel2{relative: 0.485 0.485; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
         }
@@ -155,8 +123,8 @@ collections {
             type: SWALLOW;
             description {
                 state: "default" 0.0;
-                rel1{relative: 0.488 0.325; to: SIZE_SETTER;}
-                rel2{relative: 0.838 0.675; to: SIZE_SETTER;}
+                rel1{relative: 0.515 0.185; to: SIZE_SETTER;}
+                rel2{relative: 0.815 0.485; to: SIZE_SETTER;}
                 aspect: 1.0 1.0;
                 aspect_preference: BOTH;
                 visible: 0;
@@ -169,20 +137,17 @@ collections {
             }
             description {
                 state: "item_count_2" 0.0;
-                rel1{relative: 0.488 0.325; to: SIZE_SETTER;}
-                rel2{relative: 0.838 0.675; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
             description {
                 state: "item_count_3" 0.0;
-                rel1{relative: 0.515 0.185; to: SIZE_SETTER;}
-                rel2{relative: 0.815 0.485; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
             description {
                 state: "item_count_4" 0.0;
-                rel1{relative: 0.515 0.185; to: SIZE_SETTER;}
-                rel2{relative: 0.815 0.485; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
         }
@@ -209,14 +174,12 @@ collections {
             }
             description {
                 state: "item_count_3" 0.0;
-                rel1{relative: 0.185 0.515; to: SIZE_SETTER;}
-                rel2{relative: 0.485 0.815; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
             description {
                 state: "item_count_4" 0.0;
-                rel1{relative: 0.185 0.515; to: SIZE_SETTER;}
-                rel2{relative: 0.485 0.815; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
         }
@@ -248,8 +211,7 @@ collections {
             }
             description {
                 state: "item_count_4" 0.0;
-                rel1{relative: 0.515 0.515; to: SIZE_SETTER;}
-                rel2{relative: 0.815 0.815; to: SIZE_SETTER;}
+                inherit: "default" 0.0;
                 visible: 1;
             }
         }
@@ -264,7 +226,6 @@ collections {
                 target: "icon_1";
                 target: "icon_2";
                 target: "icon_3";
-                target: "folder_icon_bg_image";
                 transition: DECELERATE 0.2;
             }
 
@@ -277,7 +238,6 @@ collections {
                 target: "icon_1";
                 target: "icon_2";
                 target: "icon_3";
-                target: "folder_icon_bg_image";
                 transition: DECELERATE 0.2;
             }
 
@@ -290,7 +250,6 @@ collections {
                 target: "icon_1";
                 target: "icon_2";
                 target: "icon_3";
-                target: "folder_icon_bg_image";
                 transition: DECELERATE 0.2;
             }
             program {
@@ -302,7 +261,6 @@ collections {
                 target: "icon_1";
                 target: "icon_2";
                 target: "icon_3";
-                target: "folder_icon_bg_image";
                 transition: DECELERATE 0.2;
             }
             program {
@@ -314,7 +272,6 @@ collections {
                 target: "icon_1";
                 target: "icon_2";
                 target: "icon_3";
-                target: "folder_icon_bg_image";
             }
 
             program {
index 5d3bec1..2100555 100755 (executable)
Binary files a/res/images/folder_appicon_bg.png and b/res/images/folder_appicon_bg.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 99344ad..84d1fec
Binary files a/res/images/folder_appicon_bg_impossible.png and b/res/images/folder_appicon_bg_impossible.png differ
old mode 100644 (file)
new mode 100755 (executable)
index d61a603..038a971
Binary files a/res/images/folder_appicon_bg_possible.png and b/res/images/folder_appicon_bg_possible.png differ
index dc4bf8c..39c31ef 100755 (executable)
@@ -165,7 +165,7 @@ void apps_data_install(app_data_t *item)
     apps_db_insert(item);
     apps_data_sort();
     apps_view_icon_add(item);
-    apps_view_reroder();
+    apps_view_reorder();
 }
 
 void apps_data_uninstall(const char *package)
@@ -205,7 +205,7 @@ app_data_t *apps_data_add_folder(void)
     apps_db_insert(new_item);
     apps_view_icon_add(new_item);
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
 
     return new_item;
 }
@@ -224,7 +224,7 @@ void apps_data_delete_folder(app_data_t *folder_item)
     apps_data_s.data_list = eina_list_remove(apps_data_s.data_list, folder_item);
     apps_db_delete(folder_item);
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
     apps_view_delete_icon(folder_item);
     __apps_data_item_free(folder_item);
 }
@@ -233,7 +233,7 @@ void apps_data_update_folder(app_data_t *folder_item)
 {
     apps_db_update(folder_item);
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
 }
 
 static int __apps_data_shortcut_request_cb(const char *package_name,
@@ -276,7 +276,7 @@ static int __apps_data_shortcut_request_cb(const char *package_name,
     apps_db_insert(new_item);
     apps_view_icon_add(new_item);
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
 
     return 0;
 }
@@ -286,7 +286,7 @@ void apps_data_delete_item(app_data_t *item)
     apps_data_s.data_list = eina_list_remove(apps_data_s.data_list, item);
     apps_db_delete(item);
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
     apps_view_folder_reroder();
     if (item->parent_db_id != APPS_ROOT) {
         app_data_t *parent = __apps_data_find_item(item->parent_db_id);
@@ -307,7 +307,7 @@ void apps_data_delete_list(Eina_List *list)
     }
 
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
     apps_view_folder_reroder();
 
     EINA_LIST_FOREACH(list, find_list, item) {
index f14e182..ea2741f 100755 (executable)
@@ -249,7 +249,7 @@ void apps_view_hide_anim(double pos)
     }
 }
 
-void apps_view_reroder(void)
+void apps_view_reorder(void)
 {
     Eina_List *data_list = apps_data_get_list();
     app_data_t *item = NULL;
@@ -641,7 +641,7 @@ static void __apps_view_fill_apps(void *data, Ecore_Thread *th)
             item->app_layout = apps_view_create_icon(item);
         }
     }
-    apps_view_reroder();
+    apps_view_reorder();
 
     int ret = BADGE_ERROR_NONE;
     ret = badge_register_changed_cb(__apps_view_badge_update_cb, NULL);
@@ -1208,7 +1208,7 @@ static void __apps_view_chooser_right_btn_clicked(void *data, Evas_Object *obj,
         }
     }
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
 
     Eina_List *list = apps_data_get_list();
     EINA_LIST_FOREACH(list, find_list, item) {
@@ -1593,7 +1593,10 @@ static void __apps_view_edit_drag_icon(void *data)
                 }
             }
             if (apps_view_s.candidate_folder) {
-                elm_object_signal_emit(apps_view_s.candidate_folder->folder_layout, SIGNAL_FRAME_POSSIBLE_SHOW, SIGNAL_SOURCE);
+                if(apps_data_get_folder_item_count(apps_view_s.candidate_folder) >= APPS_FOLDER_MAX_ITEM)
+                    elm_object_signal_emit(apps_view_s.candidate_folder->folder_layout, SIGNAL_FRAME_IMPOSSIBLE_SHOW, SIGNAL_SOURCE);
+                else
+                    elm_object_signal_emit(apps_view_s.candidate_folder->folder_layout, SIGNAL_FRAME_POSSIBLE_SHOW, SIGNAL_SOURCE);
             }
         }
     }
@@ -1634,11 +1637,13 @@ static void __apps_view_edit_drop_icon(void *data)
                 evas_object_del(item->app_layout);
                 item->app_layout = NULL;
             }
-            apps_view_s.candidate_folder = NULL;
         }
+        elm_object_signal_emit(apps_view_s.candidate_folder->folder_layout, SIGNAL_FRAME_POSSIBLE_HIDE, SIGNAL_SOURCE);
+        apps_view_s.candidate_folder = NULL;
+
     }
     apps_data_sort();
-    apps_view_reroder();
+    apps_view_reorder();
 }
 
 static Eina_Bool __apps_view_scroll_timer_cb(void *data)