itc_dummy->func.state_get = NULL;
itc_dummy->func.del = NULL;
- Elm_Genlist_Item_Class *itc_1text_1icon = elm_genlist_item_class_new();
- itc_1text_1icon->item_style = "drawing";
- itc_1text_1icon->func.text_get = __emoticon_gl_text_get;
- itc_1text_1icon->func.content_get = __emoticon_gl_1_content_get;
- itc_1text_1icon->func.state_get = NULL;
- itc_1text_1icon->func.del = NULL;
+ Elm_Genlist_Item_Class *itc_1text_1icon = NULL;
+ if (app_data->mime_type == MIME_TYPE_ALL) {
+ itc_1text_1icon = elm_genlist_item_class_new();
+ itc_1text_1icon->item_style = "drawing";
+ itc_1text_1icon->func.text_get = __emoticon_gl_text_get;
+ itc_1text_1icon->func.content_get = __emoticon_gl_1_content_get;
+ itc_1text_1icon->func.state_get = NULL;
+ itc_1text_1icon->func.del = NULL;
+ }
Elm_Genlist_Item_Class *itc_group = elm_genlist_item_class_new();
itc_group->item_style = "groupindex";
it_emoticon_empty = elm_genlist_item_append(gl, itc_dummy, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
// Drawing
- it_drawing = elm_genlist_item_append(gl, itc_1text_1icon, "Doodle", NULL, ELM_GENLIST_ITEM_NONE, _drawing_item_clicked_cb, (void *)app_data);
- first_it = it_drawing;
+ if (app_data->mime_type == MIME_TYPE_ALL) {
+ it_drawing = elm_genlist_item_append(gl, itc_1text_1icon, "Doodle", NULL, ELM_GENLIST_ITEM_NONE, _drawing_item_clicked_cb, (void *)app_data);
+ first_it = it_drawing;
+ }
if (recent_emoji_list.size() > 0) {
if (is_content_reuse_on) {
}
_update_emoticon_items(emoticon_list);
}
+
+void launch_drawing_app(void *data)
+{
+ App_Data* ad = (App_Data*) data;
+ if (!ad)
+ return;
+
+ _drawing_item_clicked_cb(ad, NULL, NULL);
+}
app_control_clone(&(app_data->source_app_control), service);
app_data->reply_type = REPLY_APP_NORMAL;
+ app_data->mime_type = MIME_TYPE_ALL;
ret = app_control_get_mime(service, &mime_type);
if (ret != APP_CONTROL_ERROR_NONE) {
if (mime_type) {
LOGD("mime type = %s", mime_type);
if (!strncmp(mime_type, "image/", strlen("image/"))) {
-
+ app_data->mime_type = MIME_TYPE_IMAGE;
+ app_data->app_type = APP_TYPE_DRAWING;
+ launch_drawing_app((void *)app_data);
+ if (mime_type)
+ free(mime_type);
+ goto ACTIVATE;
} else if(!strncmp(mime_type, "audio/", strlen("audio/"))) {
+ app_data->mime_type = MIME_TYPE_AUDIO;
app_data->app_type = APP_TYPE_STT;
_stt_clicked_cb((void *)app_data, NULL, NULL);
if (mime_type)
free(mime_type);
goto ACTIVATE;
+ } else if(!strncmp(mime_type, "text/", strlen("text/"))) {
+ app_data->mime_type = MIME_TYPE_TEXT;
}
}
}