[sound-juicer] Use named initialisers in sj-prefs.c



commit 56bfa88213c8a5ea4ebf0eba5b77962bf01fa85c
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Sun May 20 19:39:36 2012 +0200

    Use named initialisers in sj-prefs.c
    
    Since we are currently adding more fields to AlbumDetails and
    TrackDetails, this makes this initialization code more future-proof.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661646

 src/sj-prefs.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/sj-prefs.c b/src/sj-prefs.c
index 0485f20..43bb000 100644
--- a/src/sj-prefs.c
+++ b/src/sj-prefs.c
@@ -244,26 +244,26 @@ static void pattern_label_update (void)
   GstEncodingProfile *profile;
 
   static const AlbumDetails sample_album = {
-    "Help!", /* title */
-    "The Beatles", /* artist */
-    "Beatles, The", /* sortname */
-    NULL, /* genre */
-    0, /* number of tracks*/
-    1, /* disc number */
-    NULL, /* track list */
-    NULL, /* release date */
-    NULL, /* album ID */
-    NULL /* artist ID */
+    .title = "Help!", /* title */
+    .artist = "The Beatles", /* artist */
+    .artist_sortname = "Beatles, The", /* sortname */
+    .genre = NULL, /* genre */
+    .number = 0, /* number of tracks*/
+    .disc_number = 1, /* disc number */
+    .tracks = NULL, /* track list */
+    .release_date = NULL, /* release date */
+    .album_id = NULL, /* album ID */
+    .artist_id = NULL /* artist ID */
   };
   static const TrackDetails sample_track = {
-    (AlbumDetails*)&sample_album,  /*album */
-    7, /* track number */
-    "Ticket To Ride", /* title */
-    "The Beatles", /* artist */
-    "Beatles, The", /* sortname */
-    0, /* duration */
-    NULL, /* track ID */
-    NULL, /* artist ID */
+    .album = (AlbumDetails*)&sample_album,  /*album */
+    .number = 7, /* track number */
+    .title = "Ticket To Ride", /* title */
+    .artist = "The Beatles", /* artist */
+    .artist_sortname = "Beatles, The", /* sortname */
+    .duration = 0, /* duration */
+    .track_id = NULL, /* track ID */
+    .artist_id = NULL, /* artist ID */
   };
 
   g_object_get (extractor, "profile", &profile, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]