Add footer border to list/info view
authorEunmi Son <eunmi.son@samsung.com>
Wed, 24 Oct 2012 10:45:18 +0000 (19:45 +0900)
committerEunmi Son <eunmi.son@samsung.com>
Thu, 25 Oct 2012 05:34:57 +0000 (14:34 +0900)
Change-Id: I600ef0f8dfb51c845e4021eb6d5411b7ecda4382

packaging/ug-setting-manage-applications-efl.spec
view/src/mgr-app-view-app-info.c
view/src/mgr-app-view-app-list.c

index 65e8966..4699055 100644 (file)
@@ -1,13 +1,13 @@
 %define _optdir        /opt
 %define _ugdir %{_optdir}/ug
 
-Name:       ug-setting-manage-applications-efl
-Summary:    Manage Application package
-Version:    0.0.28
-Release:    0
-Group:      Applications/System
-License:    Flora Software License
-Source0:    %{name}-%{version}.tar.gz
+Name:          ug-setting-manage-applications-efl
+Summary:       Manage Application package
+Version:       0.0.32
+Release:       0
+Group:         Applications/System
+License:       Flora Software License
+Source0:       %{name}-%{version}.tar.gz
 BuildRequires: cmake
 BuildRequires: gettext-tools
 BuildRequires: edje-tools
index 314b34c..d4861af 100755 (executable)
@@ -67,6 +67,7 @@
 #define ITC_LAUNCH_TEXT_ITEM_STYLE     "multiline/1text"
 #define ITC_DETAIL_ITEM_STYLE          "dialogue/1text"
 #define ITC_SEP_10_ITEM_STYLE          "dialogue/separator/10"
+#define ITC_SEP_20_ITEM_STYLE          "dialogue/separator/20"
 #define ITC_SEP_21_ITEM_STYLE          "dialogue/separator/21/with_line"
 
 typedef struct _app_info_view_data_t app_info_view_data_t;
@@ -107,6 +108,7 @@ static Elm_Genlist_Item_Class *itc_launch   = NULL;
 static Elm_Genlist_Item_Class *itc_launch_text = NULL;
 static Elm_Genlist_Item_Class *itc_detail      = NULL;
 static Elm_Genlist_Item_Class *itc_sep_10      = NULL;
+static Elm_Genlist_Item_Class *itc_sep_20      = NULL;
 static Elm_Genlist_Item_Class *itc_sep_21      = NULL;
 
 
@@ -139,6 +141,7 @@ void _app_info_back_cb(void *data, Evas_Object *obj, void *event_info)
 
        mgr_app_view_common_back_cb(ugd, EINA_FALSE);
 
+       elm_genlist_item_class_free(itc_sep_20);
        elm_genlist_item_class_free(itc_sep_21);
        elm_genlist_item_class_free(itc);
        elm_genlist_item_class_free(itc_sep_10);
@@ -953,6 +956,7 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        Elm_Object_Item *item_launch_title      = NULL;
        Elm_Object_Item *item_launch            = NULL;
        Elm_Object_Item *item_sep_10            = NULL;
+       Elm_Object_Item *item_sep_20            = NULL;
        Elm_Object_Item *item_sep_21            = NULL;
        Elm_Object_Item *item_detail            = NULL;
 
@@ -962,6 +966,8 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
 
 
        /* set the genlist item style */
+       itc_sep_20 = elm_genlist_item_class_new();
+       retv_if(itc_sep_20 == NULL, NULL);
        itc_sep_21 = elm_genlist_item_class_new();
        retv_if(itc_sep_21 == NULL, NULL);
        itc = elm_genlist_item_class_new();
@@ -989,6 +995,12 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
        itc_detail = elm_genlist_item_class_new();
        retv_if(itc_detail == NULL, NULL);
 
+       itc_sep_20->item_style                  = ITC_SEP_20_ITEM_STYLE;
+       itc_sep_20->func.text_get               = NULL;
+       itc_sep_20->func.content_get    = NULL;
+       itc_sep_20->func.state_get              = NULL;
+       itc_sep_20->func.del                    = NULL;
+
        itc_sep_21->item_style                  = ITC_SEP_21_ITEM_STYLE;
        itc_sep_21->func.text_get               = NULL;
        itc_sep_21->func.content_get    = NULL;
@@ -1187,6 +1199,11 @@ static Evas_Object *__create_genlist_app_info(Evas_Object *parent, void *data)
                MGR_APP_DEBUG_ERR("app_info->pkg_type is NULL");
        }
 
+       /* footer border */
+       item_sep_20 = elm_genlist_item_append(genlist, itc_sep_20, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       if (item_sep_20)
+               elm_genlist_item_select_mode_set(item_sep_20, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
        if (elm_genlist_first_item_get(genlist)) {
                item_sep_21 = elm_genlist_item_prepend(genlist, itc_sep_21, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
                if (item_sep_21)
index 4f8edef..2563684 100755 (executable)
@@ -41,6 +41,7 @@
 
 #define ELM_TEXT                       "elm.text"
 #define ITC_ITEM_STYLE         "dialogue/1text.1icon.2"
+#define ITC_SEP_20_ITEM_STYLE          "dialogue/separator/20"
 #define ITC_SEP_21_ITEM_STYLE  "dialogue/separator/21/with_line"
 #define GENLIST_BLOCK_CNT      10
 
@@ -94,6 +95,7 @@ mgr_app_view_t mgr_app_view_app_list = {
 };
 
 static Elm_Genlist_Item_Class *itc = NULL;
+static Elm_Genlist_Item_Class *itc_sep_20 = NULL;
 static Elm_Genlist_Item_Class *itc_sep_21 = NULL;
 
 
@@ -112,6 +114,7 @@ static void _app_list_back_cb(void *data, Evas_Object *obj, void *event_info)
        mgr_app_view_common_back_cb(data, EINA_FALSE);
 
        elm_genlist_item_class_free(itc);
+       elm_genlist_item_class_free(itc_sep_20);
        elm_genlist_item_class_free(itc_sep_21);
 
        /* bg must delete before starting on_destroy */
@@ -565,6 +568,8 @@ static void _list_update_by_install(char *pkg_type, const char *pkg_name, void *
                new_item = elm_genlist_item_append(app_list_view_data->genlist, itc, (void*)app_info_new, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel, (void*)ugd);
                ret_if(new_item == NULL);
 
+               elm_genlist_item_append(app_list_view_data->genlist, itc_sep_20, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+
                __register_index_item(app_list_view_data->index, letter_new, new_item, EINA_FALSE);
 
                MGR_APP_MEM_FREE(letter_new);
@@ -881,12 +886,15 @@ static Evas_Object *__create_genlist_app_list(Evas_Object *parent, void *data)
        struct ug_data  *ugd = (struct ug_data*)data;
        Evas_Object             *genlist        = NULL;
        Evas_Object     *index          = NULL;
+       Elm_Object_Item *item_sep_20    = NULL;
        Elm_Object_Item *item_sep_21    = NULL;
 
 
        /* set the genlist item style */
        itc = elm_genlist_item_class_new();
        retv_if(itc == NULL, NULL);
+       itc_sep_20 = elm_genlist_item_class_new();
+       retv_if(itc_sep_20 == NULL, NULL);
 \r      itc_sep_21 = elm_genlist_item_class_new();
        retv_if(itc_sep_21 == NULL, NULL);
 
@@ -896,6 +904,12 @@ static Evas_Object *__create_genlist_app_list(Evas_Object *parent, void *data)
        itc->func.state_get = NULL;
        itc->func.del           = _gl_del;
 
+       itc_sep_20->item_style          = ITC_SEP_20_ITEM_STYLE;
+       itc_sep_20->func.text_get       = NULL;
+       itc_sep_20->func.content_get= NULL;
+       itc_sep_20->func.state_get      = NULL;
+       itc_sep_20->func.del            = NULL;
+
        itc_sep_21->item_style          = ITC_SEP_21_ITEM_STYLE;
        itc_sep_21->func.text_get       = NULL;
        itc_sep_21->func.content_get= NULL;
@@ -998,7 +1012,7 @@ static Evas_Object *__create_genlist_app_list(Evas_Object *parent, void *data)
 
        for (j = 0; j < appinfo_cnt_total; j++) {
 
-               /* add the space to top of the dialogue */
+               /* header border */
                if (app_list_view_data->initialize && elm_genlist_first_item_get(genlist)) {
                        app_list_view_data->initialize = EINA_FALSE;
                        item_sep_21 = elm_genlist_item_prepend(genlist, itc_sep_21, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
@@ -1023,6 +1037,11 @@ static Evas_Object *__create_genlist_app_list(Evas_Object *parent, void *data)
                app_info_list = app_info_list + 1;
        }
 
+       /* footer border */
+       item_sep_20 = elm_genlist_item_append(genlist, itc_sep_20, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+       if (item_sep_20)
+               elm_genlist_item_select_mode_set(item_sep_20, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
        evas_object_smart_callback_add(index, "delay,changed", _index_delayed_changed, index);
        evas_object_smart_callback_add(index, "changed", _index_changed, NULL);
        evas_object_smart_callback_add(index, "selected", _index_selected, NULL);