changeset 1415:01dcb223833a trunk

[svn] - sort by track number
author nenolod
date Sun, 16 Jul 2006 09:11:31 -0700
parents ff637a82e85f
children 341c36ebe4fa
files ChangeLog audacious/playlist.c audacious/playlist.h audacious/ui_playlist.c
diffstat 4 files changed, 70 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jul 16 08:50:00 2006 -0700
+++ b/ChangeLog	Sun Jul 16 09:11:31 2006 -0700
@@ -1,3 +1,40 @@
+2006-07-16 15:50:00 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1742]
+  - update PO files
+  
+
+  Changes:        Modified:
+  +2 -0           trunk/po/Makevars  
+  +0 -1           trunk/po/POTFILES.in  
+  +1398 -1714     trunk/po/audacious.pot  
+  +1594 -1749     trunk/po/br.po  
+  +1764 -1769     trunk/po/cs.po  
+  +1525 -1754     trunk/po/cy.po  
+  +1831 -1771     trunk/po/de.po  
+  +1778 -1747     trunk/po/el.po  
+  +1772 -1751     trunk/po/es.po  
+  +1702 -1760     trunk/po/fi.po  
+  +1701 -1763     trunk/po/fr.po  
+  +1699 -1761     trunk/po/hi.po  
+  +1770 -1745     trunk/po/hu.po  
+  +1856 -1761     trunk/po/it.po  
+  +1433 -1372     trunk/po/ja.po  
+  +1555 -1753     trunk/po/ka.po  
+  +1628 -1759     trunk/po/ko.po  
+  +1699 -1761     trunk/po/lt.po  
+  +1698 -1759     trunk/po/mk.po  
+  +1832 -1770     trunk/po/nl.po  
+  +1851 -1791     trunk/po/pl.po  
+  +1649 -1762     trunk/po/pt_BR.po  
+  +1516 -1753     trunk/po/ro.po  
+  +1663 -1767     trunk/po/ru.po  
+  +1678 -1761     trunk/po/sk.po  
+  +1525 -1754     trunk/po/sv.po  
+  +1660 -1757     trunk/po/uk.po  
+  +1578 -1755     trunk/po/zh_CN.po  
+  +1737 -1798     trunk/po/zh_TW.po  
+
+
 2006-07-16 15:14:08 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1740]
   - filepopup albumart stuff, via hansmi
--- a/audacious/playlist.c	Sun Jul 16 08:50:00 2006 -0700
+++ b/audacious/playlist.c	Sun Jul 16 09:11:31 2006 -0700
@@ -107,6 +107,7 @@
 static gint playlist_compare_title(PlaylistEntry * a, PlaylistEntry * b);
 static gint playlist_compare_artist(PlaylistEntry * a, PlaylistEntry * b);
 static gint playlist_compare_date(PlaylistEntry * a, PlaylistEntry * b);
+static gint playlist_compare_track(PlaylistEntry * a, PlaylistEntry * b);
 
 static gint playlist_dupscmp_path(PlaylistEntry * a, PlaylistEntry * b);
 static gint playlist_dupscmp_filename(PlaylistEntry * a, PlaylistEntry * b);
@@ -117,7 +118,8 @@
     playlist_compare_filename,
     playlist_compare_title,
     playlist_compare_artist,
-    playlist_compare_date
+    playlist_compare_date,
+    playlist_compare_track
 };
 
 static void playlist_save_m3u(FILE * file);
@@ -1759,6 +1761,19 @@
 }
 
 static gint
+playlist_compare_track(PlaylistEntry * a,
+		       PlaylistEntry * b)
+{
+    g_return_val_if_fail(a != NULL, 0);
+    g_return_val_if_fail(b != NULL, 0);
+
+    g_return_val_if_fail(a->tuple != NULL, 0);
+    g_return_val_if_fail(b->tuple != NULL, 0);
+
+    return (a->tuple->track_number - b->tuple->track_number);
+}
+
+static gint
 playlist_compare_title(PlaylistEntry * a,
                        PlaylistEntry * b)
 {
--- a/audacious/playlist.h	Sun Jul 16 08:50:00 2006 -0700
+++ b/audacious/playlist.h	Sun Jul 16 09:11:31 2006 -0700
@@ -33,7 +33,8 @@
     PLAYLIST_SORT_FILENAME,
     PLAYLIST_SORT_TITLE,
     PLAYLIST_SORT_ARTIST,
-    PLAYLIST_SORT_DATE
+    PLAYLIST_SORT_DATE,
+    PLAYLIST_SORT_TRACK
 } PlaylistSortType;
 
 typedef enum {
--- a/audacious/ui_playlist.c	Sun Jul 16 08:50:00 2006 -0700
+++ b/audacious/ui_playlist.c	Sun Jul 16 09:11:31 2006 -0700
@@ -82,7 +82,8 @@
     PLAYLISTWIN_SORT_BYARTIST, PLAYLISTWIN_SORT_SEL_BYARTIST,
     PLAYLISTWIN_SORT_SEL_BYTITLE, PLAYLISTWIN_SORT_SEL_BYFILENAME,
     PLAYLISTWIN_SORT_SEL_BYPATH, PLAYLISTWIN_SORT_SEL_BYDATE,
-    PLAYLISTWIN_SORT_RANDOMIZE, PLAYLISTWIN_SORT_REVERSE
+    PLAYLISTWIN_SORT_RANDOMIZE, PLAYLISTWIN_SORT_REVERSE,
+    PLAYLISTWIN_SORT_BYTRACK, PLAYLISTWIN_SORT_SEL_BYTRACK
 };
 
 GtkWidget *playlistwin;
@@ -262,6 +263,8 @@
      PLAYLISTWIN_SORT_BYPATH, "<ImageItem>", sortbypathfile_pixbuf},
     {N_("/Sort List/By Date"), NULL, plsort_menu_callback,
      PLAYLISTWIN_SORT_BYDATE, "<ImageItem>", sortbydate_pixbuf},
+    {N_("/Sort List/By Track Number"), NULL, plsort_menu_callback,
+     PLAYLISTWIN_SORT_BYTRACK, "<ImageItem>", sortbytitle_pixbuf},
     {N_("/Sort Selection"), NULL, NULL, 0, "<Branch>", NULL},
     {N_("/Sort Selection/By Title"), NULL, plsort_menu_callback,
      PLAYLISTWIN_SORT_SEL_BYTITLE, "<ImageItem>", sortbytitle_pixbuf},
@@ -272,7 +275,9 @@
     {N_("/Sort Selection/By Path + Filename"), NULL, plsort_menu_callback,
      PLAYLISTWIN_SORT_SEL_BYPATH, "<ImageItem>", sortbypathfile_pixbuf},
     {N_("/Sort Selection/By Date"), NULL, plsort_menu_callback,
-     PLAYLISTWIN_SORT_SEL_BYDATE, "<ImageItem>", sortbydate_pixbuf}
+     PLAYLISTWIN_SORT_SEL_BYDATE, "<ImageItem>", sortbydate_pixbuf},
+    {N_("/Sort Selection/By Track Number"), NULL, plsort_menu_callback,
+     PLAYLISTWIN_SORT_SEL_BYTRACK, "<ImageItem>", sortbytitle_pixbuf}
 };
 
 
@@ -1850,6 +1855,10 @@
                      GtkWidget * widget)
 {
     switch (action) {
+    case PLAYLISTWIN_SORT_BYTRACK:
+        playlist_sort(PLAYLIST_SORT_TRACK);
+        playlistwin_update_list();
+        break;
     case PLAYLISTWIN_SORT_BYTITLE:
         playlist_sort(PLAYLIST_SORT_TITLE);
         playlistwin_update_list();
@@ -1870,6 +1879,10 @@
         playlist_sort(PLAYLIST_SORT_FILENAME);
         playlistwin_update_list();
         break;
+    case PLAYLISTWIN_SORT_SEL_BYTRACK:
+        playlist_sort_selected(PLAYLIST_SORT_TRACK);
+        playlistwin_update_list();
+        break;
     case PLAYLISTWIN_SORT_SEL_BYTITLE:
         playlist_sort_selected(PLAYLIST_SORT_TITLE);
         playlistwin_update_list();