+
+ // drawing button (+)
+ if (app_data->mime_type == MIME_TYPE_ALL && app_data->app_type == APP_TYPE_SELECT_MODE) {
+ Elm_Genlist_Item_Class *itc;
+ itc = elm_genlist_item_class_new();
+
+ itc->item_style = "1text.1icon";
+ itc->func.text_get = __ise_drawing_text_get;;
+ itc->func.content_get = __ise_drawing_content_get;
+ itc->func.state_get = NULL;
+ itc->func.del = NULL;
+
+ elm_genlist_item_append(app_data->genlist,
+ itc,
+ NULL,
+ NULL,
+ ELM_GENLIST_ITEM_NONE,
+ _drawing_item_clicked_cb,
+ app_data);
+
+ elm_genlist_item_class_free(itc);
+ }
+
+ // dummy item for empty space
+ Elm_Genlist_Item_Class * itc0 = elm_genlist_item_class_new();
+ itc0->item_style = "title";
+ itc0->func.text_get = NULL;
+ itc0->func.content_get = NULL;
+ itc0->func.state_get = NULL;
+ itc0->func.del = NULL;
+
+ if (g_input_template_data.input_template_array_len < 1) {
+ it_empty = elm_genlist_item_append(app_data->genlist, itc0,
+ NULL, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ NULL, NULL);
+ }
+ elm_genlist_item_class_free(itc0);
+ }
+
+ return item_size;
+}
+
+unsigned int _update_user_template_items(void *user_data)
+{
+ App_Data* app_data;
+
+ Elm_Object_Item *first;
+
+ unsigned int i = 0;
+ unsigned int item_size = 0;
+
+ app_data = (App_Data *)user_data;
+
+ if (app_data == NULL) {
+ PRINTFUNC(DLOG_ERROR, "Can not get app_data");
+ return item_size;
+ }
+
+ if (app_data->genlist == NULL) {
+ /* smartreply will update when genlist is exist only */
+ PRINTFUNC(DLOG_ERROR, "Can not get getlist");
+ return item_size;
+ }
+
+ first = elm_genlist_first_item_get(app_data->genlist);
+ if (first == NULL)
+ return 0;
+
+ if (g_input_template_data.input_template_array_len > 0) {
+ Elm_Genlist_Item_Class *itc;
+
+ itc = elm_genlist_item_class_new();
+
+ itc->item_style = "1text";
+ itc->func.text_get = __ise_user_template_gl_text_get;
+ itc->func.content_get = NULL;
+ itc->func.state_get = NULL;
+ itc->func.del = NULL;
+
+ for (i = 0; i < (unsigned int)g_input_template_data.input_template_array_len; i++) {
+ elm_genlist_item_append(app_data->genlist,
+ itc,
+ (void *)(uintptr_t)i,
+ NULL,
+ ELM_GENLIST_ITEM_NONE,
+ __ise_user_template_gl_sel,
+ app_data);
+ item_size++;
+ }
+ elm_genlist_item_class_free(itc);
+
+ // dummy item for empty space
+ Elm_Genlist_Item_Class * itc0 = elm_genlist_item_class_new();
+ itc0->item_style = "title";
+ itc0->func.text_get = NULL;
+ itc0->func.content_get = NULL;
+ itc0->func.state_get = NULL;
+ itc0->func.del = NULL;
+
+ it_empty = elm_genlist_item_append(app_data->genlist, itc0,
+ NULL, NULL,
+ ELM_GENLIST_ITEM_NONE,
+ NULL, NULL);
+ elm_genlist_item_class_free(itc0);