[easytag/wip/core-refactoring: 3/6] Enable case-sensitive sorting of artist/album list
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/core-refactoring: 3/6] Enable case-sensitive sorting of artist/album list
- Date: Fri, 5 Feb 2016 00:23:25 +0000 (UTC)
commit a5bb0b69501e93fbf8c8c9fa8e879ccc63c0f0cf
Author: David King <amigadave amigadave com>
Date: Mon Feb 1 22:47:08 2016 +0000
Enable case-sensitive sorting of artist/album list
Use et_normalized_strcmp0() when comparing.
src/file_list.c | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/file_list.c b/src/file_list.c
index 550cc71..fb8aed3 100644
--- a/src/file_list.c
+++ b/src/file_list.c
@@ -552,10 +552,14 @@ ET_Comp_Func_Sort_Artist_Item_By_Ascending_Artist (const GList *AlbumList1,
etfile1_artist = ((File_Tag *)etfile1->FileTag->data)->artist;
etfile2_artist = ((File_Tag *)etfile2->FileTag->data)->artist;
- /*if (g_settings_get_boolean (MainSettings, "sort-case-sensitive"))
- * return strcmp(etfile1_artist,etfile2_artist); */
- //else
+ if (g_settings_get_boolean (MainSettings, "sort-case-sensitive"))
+ {
+ return et_normalized_strcmp0 (etfile1_artist, etfile2_artist);
+ }
+ else
+ {
return et_normalized_strcasecmp0 (etfile1_artist, etfile2_artist);
+ }
}
/*
@@ -583,10 +587,14 @@ ET_Comp_Func_Sort_Album_Item_By_Ascending_Album (const GList *etfilelist1,
etfile1_album = ((File_Tag *)etfile1->FileTag->data)->album;
etfile2_album = ((File_Tag *)etfile2->FileTag->data)->album;
- /*if (g_settings_get_boolean (MainSettings, "sort-case-sensitive"))
- * return strcmp(etfile1_album,etfile2_album); */
- //else
+ if (g_settings_get_boolean (MainSettings, "sort-case-sensitive"))
+ {
+ return et_normalized_strcmp0 (etfile1_album, etfile2_album);
+ }
+ else
+ {
return et_normalized_strcasecmp0 (etfile1_album, etfile2_album);
+ }
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]