Enlightenment CVS committal

Author  : moom16
Project : e17
Module  : apps/eclair

Dir     : e17/apps/eclair/src/eclair_wsz2edj


Modified Files:
        eclair_wsz2edj.c 


Log Message:
* eclair_wsz2edj converts the equalizer window
* eclair supports equalizer windows (but they have still no effect)
* add a search window but search isn't possible yet

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/apps/eclair/src/eclair_wsz2edj/eclair_wsz2edj.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- eclair_wsz2edj.c    10 Jun 2005 18:30:47 -0000      1.3
+++ eclair_wsz2edj.c    1 Jul 2005 14:25:40 -0000       1.4
@@ -203,7 +203,7 @@
    char *image_file;
    char *text_file;
    char *command;
-   char *volume_file;
+   char *extracted_file;
    int extract_result;
    int i;
 
@@ -333,13 +333,13 @@
       return 1;
    }
    extract_result &= extract_image_part(image_file, 0, 0, 68, 433, 
EXTRACTION_DIR"/images/volume.png");
-   volume_file = malloc(strlen(EXTRACTION_DIR"/images/volume_bar_.png") + 3);
+   extracted_file = malloc(strlen(EXTRACTION_DIR"/images/volume_bar_.png") + 
3);
    for (i = 0; i < 28; i++)
    {
-      sprintf(volume_file, EXTRACTION_DIR"/images/volume_bar_%d.png", i);
-      extract_result &= extract_image_part(image_file, 0, i * 15, 68, 13, 
volume_file);
+      sprintf(extracted_file, EXTRACTION_DIR"/images/volume_bar_%d.png", i);
+      extract_result &= extract_image_part(image_file, 0, i * 15, 68, 13, 
extracted_file);
    }
-   free(volume_file);
+   free(extracted_file);
    extract_result &= extract_image_part(EXTRACTION_DIR"/images/volume.png", 
15, 422, 14, 11, EXTRACTION_DIR"/images/volume_bar_drag.png");
    extract_result &= extract_image_part(EXTRACTION_DIR"/images/volume.png", 0, 
422, 14, 11, EXTRACTION_DIR"/images/volume_bar_drag_down.png");
    free(image_file);
@@ -449,6 +449,26 @@
       return 1;
    }
 
+   //titlebar.bmp
+   if (!(image_file = get_case_filename("eqmain.bmp", root_dir)))
+   {
+      printf("Error: File \"%s\" is not a valid winamp skin: can\'t find file 
eqmain.bmp\n", argv[1]);
+      free(root_dir);
+      return 1;
+   }
+   extract_result &= extract_image_part(image_file, 0, 0, 275, 293, 
EXTRACTION_DIR"/images/eqmain.png");
+   extract_result &= extract_image_part(EXTRACTION_DIR"/images/eqmain.png", 0, 
0, 275, 116, EXTRACTION_DIR"/images/equalizer_main.png");
+   extract_result &= extract_image_part(EXTRACTION_DIR"/images/eqmain.png", 0, 
164, 11, 11, EXTRACTION_DIR"/images/equalizer_drag.png");
+   extract_result &= extract_image_part(EXTRACTION_DIR"/images/eqmain.png", 0, 
176, 11, 11, EXTRACTION_DIR"/images/equalizer_drag_down.png");
+   extracted_file = malloc(strlen(EXTRACTION_DIR"/images/equalizer_bar_.png") 
+ 3);
+   for (i = 0; i < 28; i++)
+   {
+      sprintf(extracted_file, EXTRACTION_DIR"/images/equalizer_bar_%d.png", i);
+      extract_result &= extract_image_part(EXTRACTION_DIR"/images/eqmain.png", 
13 + (i % 14) * 15, 164 + (i / 14) * 65, 14, 63, extracted_file);
+   }
+   free(extracted_file);
+   free(image_file);
+
    if (!extract_result)
    {
       printf("Error: an error happened while extracting the image parts\n");
@@ -493,6 +513,7 @@
    }
 
    printf("Conversion has been a success\n");
+   printf("The \"wsz2edj_temp\" is not needed anymore, you can remove it\n");
    printf("You can now launch eclair with this command:\neclair -t %s\n", 
argv[2]);
 
    free(command);




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to