Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fm.c 


Log Message:


if there is a label - use it to sort... :)

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- e_fm.c      16 Sep 2006 11:36:50 -0000      1.58
+++ e_fm.c      16 Sep 2006 12:02:53 -0000      1.59
@@ -2722,9 +2722,14 @@
 _e_fm2_cb_icon_sort(void *data1, void *data2)
 {
    E_Fm2_Icon *ic1, *ic2;
+   char *l1, *l2;
    
    ic1 = data1;
    ic2 = data2;
+   l1 = ic1->info.file;
+   if (ic1->info.label) l1 = ic1->info.label;
+   l2 = ic2->info.file;
+   if (ic2->info.label) l2 = ic2->info.label;
    if (ic1->sd->config->list.sort.dirs.first)
      {
        if ((S_ISDIR(ic1->info.statinfo.st_mode)) != 
@@ -2747,8 +2752,8 @@
      {
        char buf1[4096], buf2[4096], *p;
        
-       strncpy(buf1, ic1->info.file, sizeof(buf1) - 2);
-       strncpy(buf2, ic2->info.file, sizeof(buf2) - 2);
+       strncpy(buf1, l1, sizeof(buf1) - 2);
+       strncpy(buf2, l2, sizeof(buf2) - 2);
        buf1[sizeof(buf1) - 1] = 0;
        buf2[sizeof(buf2) - 1] = 0;
        p = buf1;
@@ -2765,7 +2770,7 @@
          }
        return strcmp(buf1, buf2);
      }
-   return strcmp(ic1->info.file, ic2->info.file);
+   return strcmp(l1, l2);
 }
 
 static int



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to