Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        distribution_thumbnailer.c filesystem.c thumbnail_system.c 


Log Message:
* File icon hinting

===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/distribution_thumbnailer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- distribution_thumbnailer.c  16 Apr 2006 11:37:03 -0000      1.7
+++ distribution_thumbnailer.c  20 Jul 2006 15:19:19 -0000      1.8
@@ -13,7 +13,7 @@
 char *
 entropy_plugin_identify ()
 {
-  return (char *) "Simple MIME plugin for images";
+  return (char *) "Central object distribution thumbnailer";
 }
 
 Ecore_List *
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/filesystem.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- filesystem.c        17 Jul 2006 17:19:28 -0000      1.71
+++ filesystem.c        20 Jul 2006 15:19:19 -0000      1.72
@@ -264,6 +264,7 @@
                                strncpy(folder, ref->path, pos - ref->path);
                        }
 
+                       /*Set the file's filename*/
                        filename = strdup (pos + 1);
 
                        /*Look for an existing file we have cached */
@@ -273,6 +274,7 @@
                        if (!(listener = entropy_core_file_cache_retrieve 
(md5))) {
        
                          file = entropy_generic_file_new ();
+
                          /*For now, just make an entropy_generic_file for this 
object */
                          strncpy (file->path, folder, 255);
                          strncpy (file->filename, filename, strlen (filename) 
+ 1);
@@ -290,6 +292,9 @@
                            file->filetype = FILE_STANDARD;
                            bzero (file->mime_type, MIME_LENGTH);
                          }
+
+                         /*Set the attached data -> icon_hint, if there*/
+                         if (ref->attach) file->icon_hint = 
strdup(ref->attach);
 
                          if (calling_request
                              && (calling_request->drill_down
===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/thumbnail_system.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- thumbnail_system.c  2 Apr 2006 05:47:38 -0000       1.9
+++ thumbnail_system.c  20 Jul 2006 15:19:19 -0000      1.10
@@ -11,7 +11,7 @@
 char *
 entropy_plugin_identify ()
 {
-  return (char *) "Simple system thumbnailer (folders, etc)";
+  return (char *) "Simple system thumbnailer (folders, known types, etc)";
 }
 
 Ecore_List *
@@ -55,7 +55,17 @@
   entropy_thumbnail *thumb = entropy_thumbnail_new ();
 
   if (!strcmp (request->file->mime_type, "file/folder")) {
-    strcpy (thumb->thumbnail_filename, PACKAGE_DATA_DIR "/icons/folder.png");
+    if (!request->file->icon_hint) {
+           strcpy (thumb->thumbnail_filename, PACKAGE_DATA_DIR 
"/icons/folder.png");
+    } else {
+           printf("Object has attach data: %s\n", request->file->icon_hint);
+           if (!strcmp(request->file->icon_hint, "video_hint")) 
+                   strcpy (thumb->thumbnail_filename, PACKAGE_DATA_DIR 
"/icons/hint_videos.png");
+           else if (!strcmp(request->file->icon_hint, "audio_hint")) 
+                   strcpy (thumb->thumbnail_filename, PACKAGE_DATA_DIR 
"/icons/hint_audio.png");
+           else if (!strcmp(request->file->icon_hint, "image_hint"))
+                   strcpy (thumb->thumbnail_filename, PACKAGE_DATA_DIR 
"/icons/hint_image.png");
+    }
   }
   else if (!strcmp (request->file->mime_type, "text/x-perl")) {
     strcpy (thumb->thumbnail_filename, PACKAGE_DATA_DIR "/icons/perl.png");
@@ -127,7 +137,7 @@
 
        plugin = entropy_malloc(sizeof(Entropy_Plugin_Thumbnailer_Child));
 
-       return plugin;
+       return ENTROPY_PLUGIN(plugin);
 }
 
 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to