Updating branch refs/heads/master
         to 1b4aa9dba3b528d0f93c0a6c8547d84b172db839 (commit)
       from ba3335f96ffacf639be32728aac149af4df8da56 (commit)

commit 1b4aa9dba3b528d0f93c0a6c8547d84b172db839
Author: Stephan Arts <[email protected]>
Date:   Sun Oct 16 12:40:54 2011 +0200

    Fix bug in sorting algoritm (did not copy-paste enough from thunar)

 src/image_list.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/image_list.c b/src/image_list.c
index 6fa1d42..0aa7a0d 100644
--- a/src/image_list.c
+++ b/src/image_list.c
@@ -655,6 +655,20 @@ cb_rstto_image_list_image_name_compare_func (RsttoFile *a, 
RsttoFile *b)
                 if (a_num > b_num)
                     result = 1;
             }
+
+            if (ap > a_base &&
+                bp > b_base &&
+                g_ascii_isdigit (*(ap -1)) &&
+                g_ascii_isdigit (*(bp -1)) )
+            {
+                a_num = strtoul (ap-1, NULL, 10); 
+                b_num = strtoul (bp-1, NULL, 10); 
+
+                if (a_num < b_num)
+                    result = -1;
+                if (a_num > b_num)
+                    result = 1;
+            }
         }
     }
 
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to