Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        ewl_list_viewer.c structure_viewer.c 


Log Message:
* Populate size and mod time

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/ewl_list_viewer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_list_viewer.c   30 Dec 2005 06:47:31 -0000      1.2
+++ ewl_list_viewer.c   30 Dec 2005 07:29:01 -0000      1.3
@@ -460,6 +460,7 @@
 gui_file* ewl_icon_local_viewer_add_icon(entropy_gui_component_instance* comp, 
entropy_generic_file* list_item, int do_mime) {
                entropy_icon_viewer* view = comp->data;
                char* text[4];
+               char buf[50];
        
                
                Ewl_Tree_Node* icon;
@@ -468,9 +469,22 @@
                if (!ecore_hash_get(view->gui_hash, list_item)) {       
                         entropy_core_file_cache_add_reference(list_item->md5); 
                
                
-                        text[0] = list_item->filename;
-                        text[1] = NULL;
-                        text[2] = NULL;
+                        text[0] = list_item->filename;   /*Name*/
+                        
+                        if (list_item->retrieved_stat) {
+                                snprintf(buf, 50, "%d kb", 
((int)list_item->properties.st_size/1024));
+                                text[1] = buf;
+                        } else
+                                text[1] = NULL;
+
+
+                       if (list_item->retrieved_stat) {
+                               time_t stime;
+                               stime = list_item->properties.st_mtime;
+                               text[2] = ctime(&stime);
+                       } else {
+                                text[2] = NULL;                  /*Mod time*/
+                       }
 
                        icon = ewl_tree_text_row_add(EWL_TREE(view->list), 
NULL, text);
                        ewl_callback_append(EWL_WIDGET(icon), 
EWL_CALLBACK_MOUSE_DOWN, icon_click_cb, view);
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/structure_viewer.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- structure_viewer.c  29 Dec 2005 19:38:07 -0000      1.21
+++ structure_viewer.c  30 Dec 2005 07:29:01 -0000      1.22
@@ -272,10 +272,6 @@
                ewl_callback_append(row, EWL_CALLBACK_DND_LEAVE, 
dnd_leave_callback, event);
                ewl_callback_append(row, EWL_CALLBACK_DND_DROP, 
dnd_drop_callback, event);
 
-               //ewl_widget_appearance_set(EWL_WIDGET(row), "entry");
-               
-
-               
                ecore_list_append(viewer->gui_events, event);
 
                /*Add this row to our map of files -> rows */




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to