Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/scripts


Modified Files:
        e_gen_menu 


Log Message:
No longer use convert (ImageMagick) to create scaled icons in menu generation,
but scale internally according to configuration setting.

===================================================================
RCS file: /cvsroot/enlightenment/e16/e/scripts/e_gen_menu,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- e_gen_menu  8 Jan 2006 13:21:31 -0000       1.45
+++ e_gen_menu  16 Jan 2006 12:45:54 -0000      1.46
@@ -310,31 +310,14 @@
        }
 }
 
-# Create scaled 18x18 pixel icon
-sub ScaleIcon {
-       local $f = shift;
-       local $g = $f;
-
-       return $f unless $DoConvert;
-
-       $g =~ s/^.*\///;
-       $g =~ s/\..*$//;
-       $g = "$EdirIcons/$g.png";
-       system("convert -geometry 16x16 $f $g");
-
-       return $g;
-}
-
 # Find that [EMAIL PROTECTED] thing
 sub FindIcon {
        local $f = shift;
+       local $x = "x";
 
        return $f if (! $f);
 
-       if (-f $f) {
-               $i = ScaleIcon($f);
-               return $i;
-       }
+       return $f if (-f $f);
 
        foreach $d (split(':', $IconDirs)) {
                $i = "$d/$f";
@@ -343,31 +326,22 @@
                        $i = "$i.png";
                        next unless -f $i;
                }
-               $i = ScaleIcon($i);
                return $i;
        }
 
        foreach $d (split(':', $IconDirs2)) {
+               next unless (-d "$d");
                foreach $t (split(':', $Themes)) {
-                       foreach $u (split(':', 
"apps:filesystems:actions:devices")) {
-                               $i = "$d/$t/16x16/$u/$f";
-                               $i = "$i.png" unless ($f =~ /\.png$/);
-                               print "Testing $i\n" if $dbg >= 2;
-                               next unless -f $i;
-                               return $i;
-                       }
-               }
-       }
-
-       foreach $d (split(':', $IconDirs2)) {
-               foreach $t (split(':', $Themes)) {
-                       foreach $u (split(':', 
"apps:filesystems:actions:devices")) {
-                               $i = "$d/$t/48x48/$u/$f";
-                               $i = "$i.png" unless ($f =~ /\.png$/);
-                               print "Testing $i\n" if $dbg >= 2;
-                               next unless -f $i;
-                               $i = ScaleIcon($i);
-                               return $i;
+                       next unless (-d "$d/$t");
+                       foreach $s (split(':', "16:24:32:48")) {
+                               next unless (-d "$d/$t/$s$x$s");
+                               foreach $u (split(':', 
"apps:filesystems:actions:devices")) {
+                                       next unless (-d "$d/$t/$s$x$s/$u");
+                                       $i = "$d/$t/$s$x$s/$u/$f";
+                                       $i = "$i.png" unless ($f =~ /\.png$/);
+                                       print "Testing $i\n" if $dbg >= 2;
+                                       return $i if (-f $i);
+                               }
                        }
                }
        }
@@ -391,7 +365,6 @@
                foreach $e (@el) {
                        $e =~ s/\.epplet$//;
                        $i = "$EdirRoot/epplet_icons/$e.icon";
-                       $i = ScaleIcon("$i") if -f "$i";
                        print FD "\"$e\" \"$i\" exec \"$d/$e.epplet\"\n";
                }
        }




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