Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        etk_structure_viewer.c filesystem.c layout_etk_simple.c 


Log Message:
* Multiple windows now works for etk layout too - run entropy for a second time 
from the command line and entropy_ipc will launch a second window from the same 
process for you.
* One step closer to location saving in etk layout

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/etk_structure_viewer.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- etk_structure_viewer.c      27 Feb 2006 08:12:01 -0000      1.11
+++ etk_structure_viewer.c      27 Feb 2006 12:14:15 -0000      1.12
@@ -7,6 +7,7 @@
 
 static int etk_callback_setup = 0;
 static Ecore_Hash* instance_map_hash = NULL;
+static Ecore_Hash* tree_map_hash = NULL;
 
 typedef struct entropy_etk_file_structure_viewer 
entropy_etk_file_structure_viewer;
 struct entropy_etk_file_structure_viewer
@@ -273,6 +274,13 @@
   if (!etk_callback_setup) {
          printf("ETK stuff setup! *******\n");
          
+         instance_map_hash = ecore_hash_new(ecore_direct_hash, 
ecore_direct_compare);
+         tree_map_hash = ecore_hash_new(ecore_direct_hash, 
ecore_direct_compare);
+
+         etk_callback_setup = 1;
+  }
+
+  if (!ecore_hash_get(tree_map_hash, ((Etk_Tree_Row*)parent_visual)->tree)) {
          etk_signal_connect("row_clicked", ETK_OBJECT( 
((Etk_Tree_Row*)parent_visual)->tree  ), 
                  ETK_CALLBACK(_etk_structure_viewer_row_clicked), NULL);
 
@@ -280,15 +288,14 @@
           dnd_types_num = 1;
           dnd_types = calloc(dnd_types_num, sizeof(char*));
           dnd_types[0] = strdup("text/uri-list");  
-          etk_widget_dnd_types_set(  ((Etk_Tree_Row*)parent_visual)->tree, 
+          etk_widget_dnd_types_set(  
ETK_WIDGET(((Etk_Tree_Row*)parent_visual)->tree), 
                                dnd_types, dnd_types_num);
-          etk_widget_dnd_dest_set( ((Etk_Tree_Row*)parent_visual)->tree  , 
ETK_TRUE);
+          etk_widget_dnd_dest_set( 
ETK_WIDGET(((Etk_Tree_Row*)parent_visual)->tree)  , ETK_TRUE);
           etk_signal_connect("drag_drop", ETK_OBJECT( 
((Etk_Tree_Row*)parent_visual)->tree  ), 
                                
ETK_CALLBACK(_etk_structure_viewer_xdnd_drag_drop_cb), NULL);
 
-         instance_map_hash = ecore_hash_new(ecore_direct_hash, 
ecore_direct_compare);
-
-         etk_callback_setup = 1;
+          ecore_hash_set(tree_map_hash, ((Etk_Tree_Row*)parent_visual)->tree, 
(int*)1);
+ 
   }
 
   structure_viewer_add_row (instance, (entropy_generic_file *) data, NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/plugins/filesystem.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- filesystem.c        26 Feb 2006 05:56:06 -0000      1.47
+++ filesystem.c        27 Feb 2006 12:14:15 -0000      1.48
@@ -152,11 +152,6 @@
       md5 = md5_entropy_path_file 
(data->resp_command.file_command.files[0]->plugin_uri, folder, pos + 1);
       instance = ecore_hash_get (stat_request_hash, md5);
 
-      //printf("Got an instance for this stat request: '%p'\n", instance);
-
-
-      //printf("Received stat response at callback for file '%s'\n", 
data->resp_command.file_command.files[0]->path);
-
       /*Build a file<->stat structure to pass to requester */
       file_stat = entropy_malloc (sizeof (entropy_file_stat));
       file_stat->stat_obj = entropy_malloc (sizeof (struct stat));
@@ -172,7 +167,16 @@
       /*Retrieve the file. This is bad - the file might not exist anymore! */
       listener = entropy_core_file_cache_retrieve (md5);
       if (listener) {
-               file_stat->file = listener->file;
+             file_stat->file = listener->file;
+
+             /*Pop stats*/
+             listener->file->properties.st_uid = data->stat.stat_obj.st_uid;
+             listener->file->properties.st_gid = data->stat.stat_obj.st_gid;
+             listener->file->properties.st_size = data->stat.stat_obj.st_size;
+             listener->file->properties.st_atime = 
data->stat.stat_obj.ist_atime;
+             listener->file->properties.st_mtime = 
data->stat.stat_obj.ist_mtime;
+             listener->file->properties.st_ctime = 
data->stat.stat_obj.ist_ctime;
+
 
              /*Build up the gui_event wrapper */
              gui_event = entropy_malloc (sizeof (entropy_gui_event));
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_etk_simple.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- layout_etk_simple.c 26 Feb 2006 04:49:43 -0000      1.18
+++ layout_etk_simple.c 27 Feb 2006 12:14:15 -0000      1.19
@@ -23,6 +23,8 @@
   Ecore_Hash* toplevel_row_entries;
 
   Etk_Widget* popup;
+
+  Ecore_Hash* config_hash;
 };
 
 typedef enum _Etk_Menu_Item_Type
@@ -47,6 +49,8 @@
 entropy_plugin_destroy (entropy_gui_component_instance * comp)
 {
   printf ("Destroying layout_etk...\n");
+
+
 }
 
 static void _etk_layout_row_clicked(Etk_Object *object, 
@@ -194,7 +198,7 @@
   Etk_Widget* menu_item;
   Etk_Widget* menu;
 
-  Ecore_Hash* config_hash;
+
   Ecore_List* config_hash_keys;
   char *tmp,*key;
 
@@ -301,18 +305,16 @@
 
   printf ("Config for layout is: '%s' (%d)\n", tmp, strlen (tmp));
   
-  config_hash = entropy_config_standard_structures_parse (layout, tmp);
-  config_hash_keys = ecore_hash_keys(config_hash);
+  gui->config_hash = entropy_config_standard_structures_parse (layout, tmp);
+  config_hash_keys = ecore_hash_keys(gui->config_hash);
   while ( (key = ecore_list_remove_first(config_hash_keys))) {
-         char* uri = ecore_hash_get(config_hash, key);
+         char* uri = ecore_hash_get(gui->config_hash, key);
          layout_etk_simple_add_header (layout, key, uri);
          
-         ecore_hash_remove(config_hash, key);
          free(key);
          free(uri);
   }
   ecore_list_destroy(config_hash_keys);
-  ecore_hash_destroy(config_hash);
   
   entropy_free (tmp);
   




-------------------------------------------------------
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

Reply via email to