Enlightenment CVS committal Author : chaos Project : e17 Module : proto
Dir : e17/proto/entropy/src/plugins Modified Files: etk_list_viewer.c etk_structure_viewer.c ewl_icon_local_viewer.c ewl_list_viewer.c layout_etk_simple.c structure_viewer.c Log Message: * Even more API rationalization. =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/etk_list_viewer.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -3 -r1.51 -r1.52 --- etk_list_viewer.c 1 Apr 2006 02:47:35 -0000 1.51 +++ etk_list_viewer.c 1 Apr 2006 04:35:36 -0000 1.52 @@ -583,38 +583,14 @@ viewer = instance->data; + entropy_core_file_cache_add_reference (file->md5); - if (!strlen (file->mime_type)) { - entropy_mime_file_identify (instance->core->mime_plugins, file); - } - if (file->mime_type) { - entropy_plugin* thumb = entropy_thumbnailer_retrieve (file->mime_type); - if (thumb) { - entropy_thumbnail_request *request = entropy_thumbnail_request_new (); - request->file = file; - request->instance = instance; - - /*Add a reference to this file, so it doesn't get cleaned up*/ - entropy_core_file_cache_add_reference (file->md5); - - entropy_notify_event *ev = - entropy_notify_request_register (instance->core->notify, instance, - ENTROPY_NOTIFY_THUMBNAIL_REQUEST, - thumb, - "entropy_thumbnailer_thumbnail_get", - request, NULL); - - entropy_notify_event_callback_add (ev, (void *) gui_event_callback, - instance); - entropy_notify_event_cleanup_add (ev, request); - - entropy_notify_event_commit (ev); - } + if (!strlen (file->mime_type)) { + entropy_mime_file_identify (file); } - - + entropy_plugin_thumbnail_request(instance, file, (void*)gui_event_callback); col1 = etk_tree_nth_col_get(ETK_TREE(viewer->tree), 0); col2 = etk_tree_nth_col_get(ETK_TREE(viewer->tree), 1); @@ -706,9 +682,6 @@ /*We need the file's mime type, * so get it here if it's not here already...*/ - /*Tell the core we're watching - * this file*/ - entropy_core_file_cache_add_reference (file->md5); list_viewer_add_row (comp, file); } @@ -759,8 +732,6 @@ entropy_generic_file* file = el; entropy_gui_event *gui_event = NULL; - entropy_core_file_cache_add_reference (file->md5); - /*And request the properties...*/ gui_event = entropy_malloc (sizeof (entropy_gui_event)); gui_event->event_type = @@ -778,7 +749,6 @@ entropy_generic_file* parent_folder = entropy_core_parent_folder_file_get(file); if (parent_folder && parent_folder == viewer->current_folder) { - entropy_core_file_cache_add_reference (file->md5); list_viewer_add_row (comp, file); } } =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/etk_structure_viewer.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- etk_structure_viewer.c 28 Mar 2006 10:31:15 -0000 1.21 +++ etk_structure_viewer.c 1 Apr 2006 04:35:36 -0000 1.22 @@ -209,7 +209,7 @@ * so get it here if it's not here already...*/ /*printf("STRUCTURE REFERENCES FILE: %p\n", file);*/ if (!strlen (file->mime_type)) { - entropy_mime_file_identify (comp->core->mime_plugins, file); + entropy_mime_file_identify (file); } if (file->filetype == FILE_FOLDER || =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/ewl_icon_local_viewer.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -3 -r1.65 -r1.66 --- ewl_icon_local_viewer.c 1 Apr 2006 02:47:35 -0000 1.65 +++ ewl_icon_local_viewer.c 1 Apr 2006 04:35:36 -0000 1.66 @@ -824,36 +824,16 @@ char *mime; entropy_plugin *thumb; - mime = entropy_mime_file_identify (comp->core->mime_plugins, list_item); + mime = entropy_mime_file_identify (list_item); if (mime && strcmp (mime, ENTROPY_NULL_MIME)) { - thumb = entropy_thumbnailer_retrieve (mime); + entropy_plugin_thumbnail_request(comp,list_item,(void*)gui_event_callback); } else { thumb = NULL; } - if (thumb) { - entropy_thumbnail_request *request = entropy_thumbnail_request_new (); - request->file = list_item; - request->instance = comp; - - entropy_core_file_cache_add_reference(request->file->md5); - - entropy_notify_event *ev = - entropy_notify_request_register (comp->core->notify, comp, - ENTROPY_NOTIFY_THUMBNAIL_REQUEST, - thumb, - "entropy_thumbnailer_thumbnail_get", - request, NULL); - - entropy_notify_event_callback_add (ev, (void *) gui_event_callback, - comp); - entropy_notify_event_cleanup_add (ev, request); - entropy_notify_event_commit (ev); - } - } return gui_object; @@ -891,8 +871,6 @@ while (i < ICON_ADD_COUNT && (file = ecore_list_remove_first (el))) { - printf("Adding '%s' (%p)\n", file->filename,file); - ewl_icon_local_viewer_add_icon (proc->requestor, file, DONT_DO_MIME); /*Remove the pre-idle-add ref*/ @@ -906,44 +884,20 @@ if (!file) term = 1; - events = ecore_list_new (); while ((file = ecore_list_remove_first (added_list))) { mime = - (char *) entropy_mime_file_identify (comp->core->mime_plugins, file); + (char *) entropy_mime_file_identify (file); if (mime && strcmp (mime, ENTROPY_NULL_MIME)) { - thumb = entropy_thumbnailer_retrieve (mime); + entropy_plugin_thumbnail_request(comp,file,(void*)gui_event_callback); } else { thumb = NULL; } - if (thumb) { - entropy_thumbnail_request *request = entropy_thumbnail_request_new (); - request->file = file; - request->instance = comp; - - entropy_notify_event *ev = - entropy_notify_request_register (comp->core->notify, proc, - ENTROPY_NOTIFY_THUMBNAIL_REQUEST, - thumb, - "entropy_thumbnailer_thumbnail_get", - request, NULL); - - entropy_notify_event_callback_add (ev, (void *) gui_event_callback, - proc->requestor); - entropy_notify_event_cleanup_add (ev, request); - - ecore_list_append (events, ev); - } - } ecore_list_destroy (added_list); - - /*Now insert all these events inside one lock */ - entropy_notify_event_bulk_commit (comp->core->notify, events); - if (!term) { proc->count += ICON_ADD_COUNT; =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/ewl_list_viewer.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ewl_list_viewer.c 1 Apr 2006 02:36:37 -0000 1.13 +++ ewl_list_viewer.c 1 Apr 2006 04:35:36 -0000 1.14 @@ -652,35 +652,16 @@ char *mime; entropy_plugin *thumb; - mime = entropy_mime_file_identify (comp->core->mime_plugins, list_item); + mime = entropy_mime_file_identify (list_item); if (mime && strcmp (mime, ENTROPY_NULL_MIME)) { - thumb = entropy_thumbnailer_retrieve (mime); + entropy_plugin_thumbnail_request(comp, list_item, (void*)gui_event_callback); } else { thumb = NULL; } - if (thumb) { - entropy_thumbnail_request *request = entropy_thumbnail_request_new (); - request->file = list_item; - request->instance = comp; - - entropy_notify_event *ev = - entropy_notify_request_register (comp->core->notify, comp, - ENTROPY_NOTIFY_THUMBNAIL_REQUEST, - thumb, - "entropy_thumbnailer_thumbnail_get", - request, NULL); - - entropy_notify_event_callback_add (ev, (void *) gui_event_callback, - comp); - entropy_notify_event_cleanup_add (ev, request); - - entropy_notify_event_commit (ev); - } - } return gui_object; @@ -731,41 +712,18 @@ events = ecore_list_new (); while ((file = ecore_list_remove_first (added_list))) { mime = - (char *) entropy_mime_file_identify (comp->core->mime_plugins, file); + (char *) entropy_mime_file_identify (file); if (mime && strcmp (mime, ENTROPY_NULL_MIME)) { - thumb = entropy_thumbnailer_retrieve (mime); + entropy_plugin_thumbnail_request(comp,file,(void*)gui_event_callback); } else { thumb = NULL; } - - if (thumb) { - entropy_thumbnail_request *request = entropy_thumbnail_request_new (); - request->file = file; - request->instance = comp; - - entropy_notify_event *ev = - entropy_notify_request_register (comp->core->notify, proc, - ENTROPY_NOTIFY_THUMBNAIL_REQUEST, - thumb, - "entropy_thumbnailer_thumbnail_get", - request, NULL); - - entropy_notify_event_callback_add (ev, (void *) gui_event_callback, - proc->requestor); - entropy_notify_event_cleanup_add (ev, request); - - ecore_list_append (events, ev); - } - } - ecore_list_destroy (added_list); - - /*Now insert all these events inside one lock */ - entropy_notify_event_bulk_commit (comp->core->notify, events); + ecore_list_destroy (added_list); if (!term) { proc->count += ICON_ADD_COUNT; =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/layout_etk_simple.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -3 -r1.32 -r1.33 --- layout_etk_simple.c 28 Mar 2006 10:31:15 -0000 1.32 +++ layout_etk_simple.c 1 Apr 2006 04:35:36 -0000 1.33 @@ -279,7 +279,7 @@ file->filetype = FILE_FOLDER; if (!strlen (file->mime_type)) { - entropy_mime_file_identify (instance->core->mime_plugins, file); + entropy_mime_file_identify (file); } instance = (*structure_plugin_init)(instance->core, instance, row,file); =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/plugins/structure_viewer.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- structure_viewer.c 21 Feb 2006 00:15:20 -0000 1.36 +++ structure_viewer.c 1 Apr 2006 04:35:36 -0000 1.37 @@ -117,7 +117,7 @@ /*We need the file's mime type, * so get it here if it's not here already...*/ if (!strlen (file->mime_type)) { - entropy_mime_file_identify (comp->core->mime_plugins, file); + entropy_mime_file_identify (file); } if (file->filetype == FILE_FOLDER || ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs