Hey folks.  Here is a patch for ewl_fileselector.c that will alpha sort the files and dir listings in the selector box.  Appearently, if you're on OS X, the lists are already sorted, but on x86 Linux, that's not the case.

I built the patch with 'cvs diff ewl_fileselector.c'  If you'd like it built a different way, submitted another way, etc., please let me know so I can do it right.

Thanks.
Dysath
Index: ewl_fileselector.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_fileselector.c,v
retrieving revision 1.17
diff -r1.17 ewl_fileselector.c
474c474
< 	Ewl_Fileselector_Data *d;
---
> 	Ewl_Fileselector_Data *d, *temp;
480a481
> 	int added = 0;
554c555,572
< 			ecore_list_append(add, d);
---
> 
> 			/* Alphabetize both lists as we populate the list */
> 			/*              -- dysath <[EMAIL PROTECTED]> */
> 			added = 0;
> 			ecore_list_goto_first(add);
> 			temp = ecore_list_current(add);
> 			while(temp) {
> 				if (strcmp(temp->name, d->name) > 0) {
> 					ecore_list_goto_index(add, (ecore_list_index(add) - 1));
> 					ecore_list_insert(add, d);
> 					added = 1;
> 					break;
> 				}
> 				temp = ecore_list_next(add);
> 			}
> 			if (added == 0) {
> 				ecore_list_append(add, d);
> 			}
795c813
< 		ewl_fileselector_data_free(d);
---
> 		// ewl_fileselector_data_free(d);

Reply via email to