Enlightenment CVS committal
Author : chaos
Project : e17
Module : proto
Dir : e17/proto/entropy/src/plugins
Modified Files:
Makefile.am filesystem.c layout_etk_simple.c
Log Message:
* Some work on the entropy side of metadata
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/Makefile.am,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- Makefile.am 30 Apr 2006 07:23:36 -0000 1.39
+++ Makefile.am 17 Jul 2006 13:41:47 -0000 1.40
@@ -103,6 +103,7 @@
$(top_srcdir)/src/dialogs/etk_progress_dialog.c \
$(top_srcdir)/src/dialogs/etk_interaction_dialog.c \
$(top_srcdir)/src/dialogs/etk_location_add_dialog.c \
+
$(top_srcdir)/src/dialogs/etk_file_context_menu.c \
$(top_srcdir)/src/dialogs/etk_mime_dialog_main.c \
$(top_srcdir)/src/dialogs/etk_properties_dialog.c \
$(top_srcdir)/src/dialogs/etk_file_cache_debug_dialog.c
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/filesystem.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- filesystem.c 16 Jul 2006 10:25:36 -0000 1.68
+++ filesystem.c 17 Jul 2006 13:41:47 -0000 1.69
@@ -1,3 +1,5 @@
+#define _GNU_SOURCE
+
#include "plugin.h"
#include <stdio.h>
#include "plugin_base.h"
@@ -9,6 +11,7 @@
#include <dirent.h>
#include <strings.h>
#include <limits.h>
+#include <string.h>
#define NO_HIDDEN 1
#define URI_POSIX "file"
@@ -18,6 +21,7 @@
Ecore_Hash *folder_monitor_hash;
Ecore_Hash *evfs_dir_requests;
entropy_core *filesystem_core; /*A reference to the core */
+Ecore_List* metadata_groups = NULL;
Ecore_List *structurelist_get (char *base);
struct stat *filestat_get (entropy_file_request * request);
@@ -30,8 +34,11 @@
void entropy_filesystem_operation_respond(long id, int response);
void entropy_filesystem_directory_create (entropy_generic_file * parent, char*
child_name);
void entropy_filesystem_file_remove (entropy_generic_file * file,
entropy_gui_component_instance* instance);
+void entropy_filesystem_metadata_groups_get(entropy_gui_component_instance*
instance);
+
+Ecore_List* entropy_filesystem_metadata_groups_retrieve();
-evfs_connection *con;
+static evfs_connection *con;
void
callback (evfs_event * data, void *obj)
@@ -413,6 +420,8 @@
evfs_filereference_to_string (data->resp_command.file_command.
files[0]);
instance = ecore_hash_get (evfs_dir_requests,
(long*)data->resp_command.client_identifier);
+ ecore_hash_remove (evfs_dir_requests,
(long*)data->resp_command.client_identifier);
+
if (instance) {
@@ -443,6 +452,42 @@
}
break;
+ case EVFS_EV_METADATA_GROUPS: {
+
+
+ Evas_List* l;
+ /*entropy_gui_event* gui_event;
+ entropy_gui_component_instance* instance;
+
+ instance = ecore_hash_get (evfs_dir_requests,
(long*)data->resp_command.client_identifier);
+ ecore_hash_remove (evfs_dir_requests,
(long*)data->resp_command.client_identifier);
+
+
+ gui_event = entropy_malloc (sizeof (entropy_gui_event));
+ gui_event->event_type =
+ entropy_core_gui_event_get (ENTROPY_GUI_EVENT_METADATA_GROUPS);
+
+ gui_event->data = data->misc.string_list;
+
+
+ entropy_core_layout_notify_event (instance, gui_event,
+ ENTROPY_EVENT_LOCAL);*/
+
+ if (metadata_groups) {
+ char* obj;
+ while ((obj = ecore_list_remove_first(metadata_groups))) {
+ free(obj);
+ }
+ }
+ for (l = data->misc.string_list; l; ) {
+ ecore_list_append(metadata_groups, strdup(l->data));
+
+ l=l->next;
+ }
+
+ }
+ break;
+
default:
printf ("Received an EVFS message we don't recognise!\n");
break;
@@ -530,6 +575,9 @@
/*Save a core reference to avoid lookups*/
filesystem_core = core;
+ /*Somewhere to store metadata groups */
+ metadata_groups = ecore_list_new();
+
plugin = entropy_malloc(sizeof(Entropy_Plugin_File));
base = ENTROPY_PLUGIN(plugin);
@@ -543,6 +591,8 @@
plugin->file_functions.operation_respond =
&entropy_filesystem_operation_respond;
plugin->file_functions.directory_create =
&entropy_filesystem_directory_create;
plugin->file_functions.file_remove = &entropy_filesystem_file_remove;
+ plugin->misc_functions.groups_get = &entropy_filesystem_metadata_groups_get;
+ plugin->misc_functions.groups_retrieve =
&entropy_filesystem_metadata_groups_retrieve;
return base;
@@ -778,9 +828,6 @@
new_request->set_parent = 1;
}
-
-
-
new_request->core = request->core;
new_request->drill_down = request->drill_down;
new_request->requester = request->requester;
@@ -958,4 +1005,19 @@
{
printf("Received response for %ld -> %d\n", id, response);
evfs_client_operation_respond(con, id, response);
+}
+
+
+/*Metadata file groups get*/
+void
+entropy_filesystem_metadata_groups_get(entropy_gui_component_instance*
instance)
+{
+ long id = evfs_client_metadata_groups_get(con);
+ ecore_hash_set (evfs_dir_requests, (long*)id, instance);
+}
+
+Ecore_List*
+entropy_filesystem_metadata_groups_retrieve()
+{
+ return metadata_groups;
}
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/layout_etk_simple.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- layout_etk_simple.c 15 Jul 2006 12:50:55 -0000 1.49
+++ layout_etk_simple.c 17 Jul 2006 13:41:47 -0000 1.50
@@ -7,6 +7,7 @@
#include "etk_user_interaction_dialog.h"
#include "etk_mime_dialog.h"
#include "etk_file_cache_dialog.h"
+#include "entropy_etk_context_menu.h"
#include <dlfcn.h>
#include <Ecore.h>
#include <stdlib.h>
@@ -495,6 +496,11 @@
}
break;
+ case ENTROPY_NOTIFY_METADATA_GROUPS: {
+
/*entropy_etk_context_menu_metadata_groups_populate((Evas_List*)eevent->return_struct);*/
+ }
+ break;
+
}
}
@@ -532,21 +538,25 @@
Entropy_Config_Structure* structure;
+ /*Entropy related init */
+ layout =
(entropy_gui_component_instance*)entropy_gui_component_instance_layout_new();
/*Create a component instance */
+ gui = entropy_malloc (sizeof (entropy_layout_gui));
+ layout->data = gui;
+ layout->core = core;
+ gui->progress_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
+ gui->properties_request_hash = ecore_hash_new(ecore_direct_hash,
ecore_direct_compare);
+
/*Global init for all layouts*/
if (!_etk_layout_global_init) {
+ /*Request metadata groups from evfs*/
+ entropy_plugin_filesystem_metadata_groups_get(layout);
+
_etk_layout_row_reference = ecore_hash_new(ecore_direct_hash,
ecore_direct_compare);
_etk_layout_structure_plugin_reference =
ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
_etk_layout_global_init = 1;
}
- /*Entropy related init */
- layout =
(entropy_gui_component_instance*)entropy_gui_component_instance_layout_new();
/*Create a component instance */
- gui = entropy_malloc (sizeof (entropy_layout_gui));
- layout->data = gui;
- layout->core = core;
- gui->progress_hash = ecore_hash_new(ecore_direct_hash, ecore_direct_compare);
- gui->properties_request_hash = ecore_hash_new(ecore_direct_hash,
ecore_direct_compare);
/*Register this layout container with the core, so our children can get
events */
entropy_core_layout_register (core, layout);
@@ -577,6 +587,10 @@
entropy_core_component_event_register (layout,
entropy_core_gui_event_get
(ENTROPY_GUI_EVENT_FILE_STAT_AVAILABLE));
+
+ entropy_core_component_event_register (layout,
+ entropy_core_gui_event_get
+ (ENTROPY_GUI_EVENT_METADATA_GROUPS));
/*Etk related init */
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs