Revision: 2158
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2158&view=rev
Author:   tmzullinger
Date:     2008-12-08 01:16:31 +0000 (Mon, 08 Dec 2008)

Log Message:
-----------
Whitespace cleanup

This just cleans up some minor whitespace issues to make diffing and
merging slightly nicer.

Modified Paths:
--------------
    libgpod/trunk/docs/reference/libgpod-sections.txt
    libgpod/trunk/src/itdb.h
    libgpod/trunk/src/itdb_artwork.c
    libgpod/trunk/src/itdb_chapterdata.c
    libgpod/trunk/src/itdb_device.c
    libgpod/trunk/src/itdb_device.h
    libgpod/trunk/src/itdb_itunesdb.c
    libgpod/trunk/src/itdb_photoalbum.c
    libgpod/trunk/src/itdb_playlist.c
    libgpod/trunk/src/itdb_plist.c
    libgpod/trunk/src/itdb_sysinfo_extended_parser.c
    libgpod/trunk/src/itdb_thumb.c
    libgpod/trunk/src/itdb_thumb.h
    libgpod/trunk/src/itdb_track.c

Modified: libgpod/trunk/docs/reference/libgpod-sections.txt
===================================================================
--- libgpod/trunk/docs/reference/libgpod-sections.txt   2008-12-07 11:46:05 UTC 
(rev 2157)
+++ libgpod/trunk/docs/reference/libgpod-sections.txt   2008-12-08 01:16:31 UTC 
(rev 2158)
@@ -207,9 +207,6 @@
 itdb_photodb_write
 </SECTION>
 
-
-
-
 <SECTION>
 <FILE>Internal</FILE>
 <SUBSECTION Private>

Modified: libgpod/trunk/src/itdb.h
===================================================================
--- libgpod/trunk/src/itdb.h    2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb.h    2008-12-08 01:16:31 UTC (rev 2158)
@@ -1192,7 +1192,7 @@
 void itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork);
 /* the following function returns a pointer to a GdkPixbuf if
    gdk-pixbuf is installed -- a NULL pointer otherwise. */
-gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork, 
+gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
                                   gint width, gint height);
 
 /* itdb_thumb_... */

Modified: libgpod/trunk/src/itdb_artwork.c
===================================================================
--- libgpod/trunk/src/itdb_artwork.c    2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_artwork.c    2008-12-08 01:16:31 UTC (rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -45,9 +45,9 @@
 
 /**
  * itdb_artwork_new:
- * 
- * Creates a new #Itdb_Artwork 
  *
+ * Creates a new #Itdb_Artwork
+ *
  * Return value: a new #Itdb_Artwork to be freed with itdb_artwork_free() when
  * no longer needed
  **/
@@ -100,7 +100,7 @@
  * itdb_artwork_remove_thumbnails:
  * @artwork: an #Itdb_Artwork
  *
- * Removes all thumbnails from @artwork 
+ * Removes all thumbnails from @artwork
  **/
 void
 itdb_artwork_remove_thumbnails (Itdb_Artwork *artwork)
@@ -115,9 +115,6 @@
     artwork->id = 0;
 }
 
-
-
-
 /**
  * itdb_artwork_set_thumbnail
  * @artwork: an #Itdb_Thumbnail
@@ -127,7 +124,7 @@
  * counterclockwise. Valid values are 0, 90, 180 and 270.
  * @error: return location for a #GError or NULL
  *
- * Appends a thumbnail of type @type to existing thumbnails in @artwork. No 
+ * Appends a thumbnail of type @type to existing thumbnails in @artwork. No
  * data is read from @filename yet, the file will be when @artwork is saved to
  * disk. @filename must still exist when that happens.
  *
@@ -311,7 +308,7 @@
                result[3*i] = (cur_pixel & RED_MASK_565) >> RED_SHIFT_565;
                result[3*i+1] = (cur_pixel & GREEN_MASK_565) >> GREEN_SHIFT_565;
                result[3*i+2] = (cur_pixel & BLUE_MASK_565) >> BLUE_SHIFT_565;
-               
+
                /* Normalize color values so that they use a [0..255] range */
                result[3*i] <<= (8 - RED_BITS_565);
                result[3*i+1] <<= (8 - GREEN_BITS_565);
@@ -339,7 +336,7 @@
                result[3*i] = (cur_pixel & RED_MASK_555) >> RED_SHIFT_555;
                result[3*i+1] = (cur_pixel & GREEN_MASK_555) >> GREEN_SHIFT_555;
                result[3*i+2] = (cur_pixel & BLUE_MASK_555) >> BLUE_SHIFT_555;
-               
+
                /* Normalize color values so that they use a [0..255] range */
                result[3*i] <<= (8 - RED_BITS_555);
                result[3*i+1] <<= (8 - GREEN_BITS_555);
@@ -368,7 +365,7 @@
                result[3*i] = (cur_pixel & RED_MASK_888) >> RED_SHIFT_888;
                result[3*i+1] = (cur_pixel & GREEN_MASK_888) >> GREEN_SHIFT_888;
                result[3*i+2] = (cur_pixel & BLUE_MASK_888) >> BLUE_SHIFT_888;
-               
+
                /* Normalize color values so that they use a [0..255] range */
                /* (not necessary for 888 encoding) */
 /*             result[3*i] <<= (8 - RED_BITS_888); */
@@ -413,7 +410,7 @@
                          width/2, height/2,
                          row_stride);
     }
-    
+
     return pixels_d;
 }
 
@@ -462,7 +459,7 @@
                result[3*i] = (cur_pixel & RED_MASK_555) >> RED_SHIFT_555;
                result[3*i+1] = (cur_pixel & GREEN_MASK_555) >> GREEN_SHIFT_555;
                result[3*i+2] = (cur_pixel & BLUE_MASK_555) >> BLUE_SHIFT_555;
-               
+
                /* Normalize color values so that they use a [0..255] range */
                result[3*i] <<= (8 - RED_BITS_555);
                result[3*i+1] <<= (8 - GREEN_BITS_555);
@@ -503,7 +500,7 @@
                result[3*i] = (cur_pixel & RED_MASK_888) >> RED_SHIFT_888;
                result[3*i+1] = (cur_pixel & GREEN_MASK_888) >> GREEN_SHIFT_888;
                result[3*i+2] = (cur_pixel & BLUE_MASK_888) >> BLUE_SHIFT_888;
-               
+
                /* Normalize color values so that they use a [0..255] range */
                /* (not really necessary for 888 encoding) */
 /*             result[3*i] <<= (8 - RED_BITS_888); */
@@ -561,9 +558,9 @@
                u = yuvdata[ustart + (row/2)*(width/2) + col/2];
                v = yuvdata[vstart + (row/2)*(width/2) + col/2];
 
-               rgbdata[z] = limit8bit((y-16)*1.164 + (v-128)*1.596); 
-               rgbdata[z+1] = limit8bit((y-16)*1.164 - (v-128)*0.813 - 
(u-128)*0.391); 
-               rgbdata[z+2] = limit8bit((y-16)*1.164 + (u-128)*2.018); 
+               rgbdata[z] = limit8bit((y-16)*1.164 + (v-128)*1.596);
+               rgbdata[z+1] = limit8bit((y-16)*1.164 - (v-128)*0.813 - 
(u-128)*0.391);
+               rgbdata[z+2] = limit8bit((y-16)*1.164 + (u-128)*2.018);
 
                z+=3;
                h++;
@@ -664,7 +661,7 @@
 
        f = fopen (filename, "r");
        if (f == NULL) {
-               g_print ("Failed to open %s: %s\n", 
+               g_print ("Failed to open %s: %s\n",
                         filename, strerror (errno));
                goto error;
        }
@@ -678,7 +675,7 @@
 
        res = fread (result, thumb->size, 1, f);
        if (res != 1) {
-               g_print ("Failed to read %u bytes from %s: %s\n", 
+               g_print ("Failed to read %u bytes from %s: %s\n",
                         thumb->size, thumb->filename, strerror (errno));
                goto error;
        }
@@ -709,11 +706,11 @@
 #endif
        void *pixels_raw;
        guchar *pixels=NULL;
-            
+
        g_return_val_if_fail (device, NULL);
        g_return_val_if_fail (item, NULL);
        g_return_val_if_fail (item->size != 0, NULL);
-       
+
         if (item->format == NULL) {
             return NULL;
         }
@@ -800,8 +797,8 @@
 
 }
 
-gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device, 
-                                         Itdb_Thumb_Ipod_Item *item) 
+gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                         Itdb_Thumb_Ipod_Item *item)
 {
        /* pixbuf is already on the iPod -> read from there */
        GdkPixbuf *pixbuf_full;
@@ -876,7 +873,7 @@
         return pixbuf;
 }
 #else
-gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device, 
+gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
                                          Itdb_Thumb_Ipod_Item *item)
 {
     return NULL;
@@ -894,20 +891,20 @@
  * and 0 for the smallest possible size (with no scaling)
  *
  * Returns a #GdkPixbuf representing the thumbnail stored in @artwork
- * scaling it if appropriate. If either height or width is -1, then the 
+ * scaling it if appropriate. If either height or width is -1, then the
  * biggest unscaled thumbnail available will be returned
  *
  * Return value: a #GdkPixbuf that must be unreffed when no longer used, NULL
  * if no artwork could be found or if libgpod is compiled without GdkPixbuf
  * support
  **/
-gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork, 
+gpointer itdb_artwork_get_pixbuf (Itdb_Device *device, Itdb_Artwork *artwork,
                                   gint width, gint height)
 {
     g_return_val_if_fail (artwork != NULL, NULL);
     if (artwork->thumbnail == NULL) {
         return NULL;
     }
-    return itdb_thumb_to_pixbuf_at_size (device, artwork->thumbnail, 
+    return itdb_thumb_to_pixbuf_at_size (device, artwork->thumbnail,
                                          width, height);
 }

Modified: libgpod/trunk/src/itdb_chapterdata.c
===================================================================
--- libgpod/trunk/src/itdb_chapterdata.c        2008-12-07 11:46:05 UTC (rev 
2157)
+++ libgpod/trunk/src/itdb_chapterdata.c        2008-12-08 01:16:31 UTC (rev 
2158)
@@ -2,7 +2,7 @@
 |
 |  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -36,12 +36,11 @@
 #include <string.h>
 #include <glib/gi18n-lib.h>
 
-
 /**
  * itdb_chapterdata_new:
- * 
- * Creates a new #Itdb_Chapterdata 
  *
+ * Creates a new #Itdb_Chapterdata
+ *
  * Return value: a new #Itdb_Chapterdata to be freed with 
itdb_chapterdata_free() when
  * no longer needed
  **/
@@ -68,7 +67,7 @@
 {
     GList *it;
     GList *result;
-    
+
     g_return_val_if_fail (chapters, NULL);
     result = NULL;
     for (it = chapters; it != NULL; it = it->next)
@@ -80,7 +79,7 @@
        g_return_val_if_fail (chapter, NULL);
 
        new_chapter = itdb_chapter_duplicate (chapter);
-       
+
        result = g_list_prepend (result, new_chapter);
     }
 
@@ -135,7 +134,7 @@
  * itdb_chapterdata_remove_chapters:
  * @chapterdata: an #Itdb_Chapterdata
  *
- * Removes all chapters from @chapterdata 
+ * Removes all chapters from @chapterdata
  **/
 void
 itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata)
@@ -152,7 +151,7 @@
 
 /**
  * itdb_chapter_new:
- * 
+ *
  * Creates a new #Itdb_Chapter
  *
  * Return Value: newly allocated #Itdb_Chapter to be freed with 
itdb_chapter_free()
@@ -164,7 +163,7 @@
     return chapter;
 }
 
-/** 
+/**
  * itdb_chapter_free:
  * @chapter: an #Itdb_Chapter
  *
@@ -178,13 +177,13 @@
     g_free (chapter);
 }
 
-/** 
+/**
  * itdb_chapter_duplicate:
  * @chapter: an #Itdb_Chapter
  *
  * Duplicates the data contained in @chapter
  *
- * Return value: a newly allocated copy of @chapter to be freed with 
+ * Return value: a newly allocated copy of @chapter to be freed with
  * itdb_chapter_free() after use
  **/
 Itdb_Chapter *itdb_chapter_duplicate (Itdb_Chapter *chapter)
@@ -196,7 +195,7 @@
     new_chapter = itdb_chapter_new ();
     memcpy (new_chapter, chapter, sizeof (Itdb_Chapter));
     new_chapter->chaptertitle = g_strdup (chapter->chaptertitle);
- 
+
     return new_chapter;
 }
 

Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c     2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_device.c     2008-12-08 01:16:31 UTC (rev 2158)
@@ -1204,7 +1204,6 @@
  * It will overwrite the previous setting.
  *
  */
-
 G_GNUC_INTERNAL void
 itdb_device_autodetect_endianess (Itdb_Device *device)
 {
@@ -1362,7 +1361,6 @@
  *
  * Return value: true if @device can play videos.
  */
-
 gboolean itdb_device_supports_video (const Itdb_Device *device)
 {
     const Itdb_IpodInfo *info;
@@ -1409,7 +1407,6 @@
  *
  * Return value: true if @device can display photos.
  */
-
 gboolean itdb_device_supports_photo (const Itdb_Device *device)
 {
     GList *formats;

Modified: libgpod/trunk/src/itdb_device.h
===================================================================
--- libgpod/trunk/src/itdb_device.h     2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_device.h     2008-12-08 01:16:31 UTC (rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -99,12 +99,12 @@
         gint width;
         gint height;
         ItdbThumbFormat format;
-        gint32 padding; /* not found in SysInfoExtended, added  
-                         * for compatibility with hardcoded artwork formats */ 
+        gint32 padding; /* not found in SysInfoExtended, added
+                         * for compatibility with hardcoded artwork formats */
         gboolean crop;
         gint rotation;
         guchar back_color[4];
- 
+
         gint display_width;
         gboolean interlaced;
         gboolean align_row_bytes;

Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c   2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_itunesdb.c   2008-12-08 01:16:31 UTC (rev 2158)
@@ -1198,7 +1198,6 @@
     return g_list_length (itdb->playlists);
 }
 
-
 /**
  * itdb_tracks_number:
  * @itdb: an #Itdb_iTunesDB
@@ -1239,8 +1238,6 @@
     return n;
 }
 
-
-
 /**
  * itdb_new:
  *
@@ -3044,7 +3041,6 @@
     return itdb;
 }
 
-
 /**
  * itdb_parse_file:
  * @filename: path to a file in iTunesDB format
@@ -5378,7 +5374,6 @@
 
 */
 
-
 /**
  * itdb_shuffle_write:
  * @itdb: the #Itdb_iTunesDB to write to disk
@@ -5405,7 +5400,7 @@
     g_return_val_if_fail (itdb_get_mountpoint (itdb), FALSE);
 
     itunes_path = itdb_get_itunes_dir (itdb_get_mountpoint (itdb));
-    
+
     if(!itunes_path)
     {
        gchar *str = g_build_filename (itdb_get_mountpoint (itdb),
@@ -5447,13 +5442,14 @@
     }
     return FALSE;
 }
+
 /**
  * itdb_shuffle_write_file:
  * @itdb: the #Itdb_iTunesDB to write to disk
  * @filename: file to write to, cannot be NULL
  * @error: return location for a #GError or NULL
  *
- * Do the actual writing to the iTunesSD 
+ * Do the actual writing to the iTunesSD
  *
  * Return value: TRUE on success, FALSE on error, in which case @error is
  * set accordingly.
@@ -5564,23 +5560,12 @@
     return result;
 }
 
-
-
-
-
-
-
-
-
-
-
 /*------------------------------------------------------------------*\
  *                                                                  *
  *                  Other file/filename stuff                       *
  *                                                                  *
 \*------------------------------------------------------------------*/
 
-
 /**
  * itdb_rename_files:
  * @mp: mount point of the iPod
@@ -5589,7 +5574,7 @@
  * Renames/removes some files on the iPod (Playcounts, OTG
  * semaphore). May have to be called if you write the iTunesDB not
  * directly to the iPod but to some other location and then manually
- * copy the file from there to the iPod. 
+ * copy the file from there to the iPod.
  *
  * Return value: FALSE on error and sets @error accordingly
  **/
@@ -5616,7 +5601,7 @@
     }
 
     plcname_o = itdb_resolve_path (itunesdir, db_plc_o);
-    plcname_n = g_build_filename (itunesdir, 
+    plcname_n = g_build_filename (itunesdir,
                                         "Play Counts.bak", NULL);
     otgname = itdb_resolve_path (itunesdir, db_otg);
     shuname = itdb_resolve_path (itunesdir, db_shu);
@@ -5706,8 +5691,6 @@
     g_strdelimit (ipod_file, ":", G_DIR_SEPARATOR);
 }
 
-
-
 /**
  * itdb_set_mountpoint:
  * @itdb: an #Itdb_iTunesDB
@@ -5869,7 +5852,7 @@
 
        g_snprintf (dir_num_str, 6, "F%02d", dir_num);
        dest_components[0] = dir_num_str;
-  
+
        parent_dir_filename =
            itdb_resolve_path (music_dir, (const gchar **)dest_components);
        if(parent_dir_filename == NULL)
@@ -5927,7 +5910,6 @@
     return ipod_fullfile;
 }
 
-
 /**
  * itdb_cp_finalize:
  * @track: track to update or NULL
@@ -6053,7 +6035,6 @@
     return use_track;
 }
 
-
 /**
  * itdb_cp_track_to_ipod:
  * @track: the #Itdb_Track to copy (containing @filename metadata)
@@ -6115,8 +6096,6 @@
     return result;
 }
 
-
-
 /**
  * itdb_filename_on_ipod:
  * @track: an #Itdb_Track
@@ -6168,7 +6147,6 @@
     return result;
 }
 
-
 /* Use open instead of fopen.  fwrite is really slow on the Mac. */
 /**
  * itdb_cp:
@@ -6333,7 +6311,6 @@
     return TRUE;
 }
 
-
 /**
  * itdb_get_control_dir:
  * @mountpoint: the iPod mountpoint
@@ -6542,7 +6519,7 @@
  *
  * Retrieve a path to the ArtworkDB
  *
- * Return value: path to the ArtworkDB or NULL if non-existent. Must g_free() 
+ * Return value: path to the ArtworkDB or NULL if non-existent. Must g_free()
  * after use.
  **/
 gchar *itdb_get_artworkdb_path (const gchar *mountpoint)
@@ -6574,10 +6551,10 @@
  *
  * Gets the current time in a format appropriate for storing in the libgpod
  * data structures
- * 
+ *
  * Return value: current time
  *
- * Deprecated: kept for compatibility with older code, directly use 
+ * Deprecated: kept for compatibility with older code, directly use
  * g_get_current_time() or time(NULL) instead
  **/
 time_t itdb_time_get_mac_time (void)
@@ -6589,7 +6566,6 @@
     return time.tv_sec;
 }
 
-
 /**
  * itdb_time_mac_to_host:
  * @time: time expressed in libgpod format
@@ -6648,29 +6624,29 @@
        Itdb_Playlist *mpl = NULL;
        Itdb_IpodInfo const *info = NULL;
        gchar *path;
-       
+
        g_return_val_if_fail (mountpoint, FALSE);
-                                               
+
        /* Create new blank itdb database for writing to iPod */
        itdb = itdb_new();
-                                       
+
        /* Assign iPod device reference to new database */
        itdb_set_mountpoint(itdb, mountpoint);
-       
+
        /* Insert model_number into sysinfo file if present
         * The model number can be extracted in a couple of ways:
         *              - use the read_sysinfo_file function
-        *              - use libipoddevice and hal to get the model
-        *                (as far as I know, libipoddevice will also
-         *                read the sysinfo file, complemented by some
-        *                guessing).
+        *              - use libipoddevice and hal to get the model
+        *                (as far as I know, libipoddevice will also
+        *                read the sysinfo file, complemented by some
+        *                guessing).
         */
        if (model_number)
        {
            itdb_device_set_sysinfo (itdb->device,
                                     "ModelNumStr", model_number);
        }
-       
+
        /* Create the remaining directories resident on blank ipod */
        writeok = itdb_create_directories(itdb->device, error);
        if(! writeok)
@@ -6707,7 +6683,7 @@
 
        /* Retrieve the model from the device information */
        info = itdb_device_get_ipod_info(itdb->device);
-    
+
        /* If model is a shuffle or the model is undetermined,
         * ie. @model_number is NULL, then create the itunesSD database
         */
@@ -6716,12 +6692,12 @@
            path = itdb_get_itunessd_path (mountpoint);
            if (!path)
            {
-               writeok = itdb_shuffle_write(itdb, error);
-               if(! writeok)
-               {
-                   itdb_free (itdb);
+               writeok = itdb_shuffle_write(itdb, error);
+               if(! writeok)
+               {
+                   itdb_free (itdb);
                    return FALSE;
-               }
+               }
            }
            g_free (path);
        }
@@ -6905,7 +6881,6 @@
        }
        g_free (pbuf);
     }
-    
 
     /* Build the directories that hold the music files */
     dirnum = info->musicdirs;
@@ -6983,11 +6958,11 @@
            {
                goto error_dir;
            }
-       }
+       }
        g_free (pbuf);
 
        model_number = itdb_device_get_sysinfo (device, "ModelNumStr");
-       /* Construct a SysInfo file */
+       /* Construct a SysInfo file */
        if (model_number && (strlen (model_number) != 0))
        {
            pbuf = NULL;
@@ -7005,7 +6980,7 @@
     if (pbuf)
     {
        g_set_error (error, 0, -1,
-                    _("Problem creating iPod directory or file: '%s'."), 
+                    _("Problem creating iPod directory or file: '%s'."),
                     pbuf);
        result = FALSE;
     } else

Modified: libgpod/trunk/src/itdb_photoalbum.c
===================================================================
--- libgpod/trunk/src/itdb_photoalbum.c 2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_photoalbum.c 2008-12-08 01:16:31 UTC (rev 2158)
@@ -2,7 +2,7 @@
 |
 |  Copyright (C) 2002-2006 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -86,7 +86,7 @@
 
    For example, "MA450" would stand for an 80 GB 6th generation iPod
    Video. See itdb_device.c for a list of supported models.
-   
+
    This information will be written to the iPod when the PhotoDB is
    saved (itdb_device_write_sysinfo() is called).
 */
@@ -114,7 +114,6 @@
     }
 }
 
-
 /**
  * itdb_get_photos_dir:
  * @mountpoint: mountpoint of iPod
@@ -200,7 +199,6 @@
     return result;
 }
 
-
 /**
  * itdb_photodb_parse:
  * @mp: mountpoint of the iPod
@@ -239,7 +237,6 @@
     return photodb;
 }
 
-
 /**
  * itdb_photodb_create:
  * @mountpoint: mountpoint or NULL.
@@ -268,7 +265,6 @@
 }
 
 
-
 static Itdb_PhotoDB *itdb_photodb_new (void)
 {
     Itdb_PhotoDB *photodb;
@@ -279,13 +275,11 @@
     return photodb;
 }
 
-
-
-/** 
+/**
  * itdb_photodb_free:
  * @photodb: an #Itdb_PhotoDB
  *
- * Free the memory taken by @photodb. 
+ * Free the memory taken by @photodb.
  **/
 void itdb_photodb_free (Itdb_PhotoDB *photodb)
 {
@@ -309,7 +303,7 @@
 
 
 
-G_GNUC_INTERNAL gint itdb_get_max_photo_id ( Itdb_PhotoDB *db ) 
+G_GNUC_INTERNAL gint itdb_get_max_photo_id ( Itdb_PhotoDB *db )
 {
        gint max_seen_id = 0;
        GList *it;
@@ -464,8 +458,6 @@
 #endif
 }
 
-
-
 /**
  * itdb_photodb_add_photo:
  * @db: the #Itdb_PhotoDB to add the photo to.
@@ -499,7 +491,6 @@
                                            position, rotation, error);
 }
 
-
 /**
  * itdb_photodb_add_photo_from_data:
  * @db: the #Itdb_PhotoDB to add the photo to.
@@ -570,7 +561,6 @@
                                            position, rotation, error);
 }
 
-
 /**
  * itdb_photodb_remove_photo:
  * @db: the #Itdb_PhotoDB to remove the photo from
@@ -713,7 +703,6 @@
     album->members = g_list_insert (album->members, photo, position);
 }
 
-
 /**
  * itdb_photodb_photoalbum_create:
  * @db: The database to create a new album in

Modified: libgpod/trunk/src/itdb_playlist.c
===================================================================
--- libgpod/trunk/src/itdb_playlist.c   2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_playlist.c   2008-12-08 01:16:31 UTC (rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -135,14 +135,13 @@
     return(ITDB_SPLFT_UNKNOWN);
 }
 
-
 /**
  * itdb_splr_get_action_type:
  * @splr: an #Itdb_SPLRule
- * 
+ *
  * Gets the type of the action associated with @splr.
  *
- * Return value: type (range, date, string...) of the action field 
+ * Return value: type (range, date, string...) of the action field
  **/
 ItdbSPLActionType itdb_splr_get_action_type (const Itdb_SPLRule *splr)
 {
@@ -319,7 +318,6 @@
  *
  */
 
-
 /**
  * itdb_splr_eval:
  * @splr: an #Itdb_SPLRule
@@ -678,7 +676,6 @@
     return list;
 }
 
-
 /**
  * itdb_playlist_randomize:
  * @pl: an #Itdb_Playlist to randomize
@@ -692,7 +689,6 @@
     pl->members = randomize_glist (pl->members);
 }
 
-
 /**
  * itdb_spl_update:
  * @spl: an #Itdb_Playlist
@@ -908,7 +904,6 @@
     }
 }
 
-
 /**
  * itdb_spl_update_all:
  * @itdb: an #Itdb_iTunesDB
@@ -930,8 +925,7 @@
         itdb_spl_update (playlist);
 }
 
-
-/** 
+/**
  * itdb_spl_update_live:
  * @itdb: an #Itdb_iTunesDB
  *
@@ -949,7 +943,6 @@
 /* end of code based on Samuel Wood's work */
 /* ------------------------------------------------------------------- */
 
-
 /**
  * itdb_splr_validate:
  * @splr: an #Itdb_SPLRule
@@ -1007,12 +1000,11 @@
 
 }
 
-
 /**
  * itdb_splr_free:
  * @splr: an #Itdb_SPLRule
  *
- * Frees the memory used by @splr 
+ * Frees the memory used by @splr
  **/
 void itdb_splr_free (Itdb_SPLRule *splr)
 {
@@ -1059,13 +1051,12 @@
                                        splr, pos);
 }
 
-
 /**
  * itdb_splr_new:
- * 
- * Creates a new default smart rule 
  *
- * Return value: a new #Itdb_SPLRule that must be freed with itdb_splr_free() 
when 
+ * Creates a new default smart rule
+ *
+ * Return value: a new #Itdb_SPLRule that must be freed with itdb_splr_free() 
when
  * no longer needed
  **/
 Itdb_SPLRule *itdb_splr_new (void)
@@ -1084,7 +1075,6 @@
     return splr;
 }
 
-
 /**
  * itdb_splr_add_new:
  * @pl: an #Itdb_Playlist
@@ -1122,7 +1112,6 @@
     return dup;
 }
 
-
 /**
  * itdb_playlist_duplicate:
  * @pl: an #Itdb_Playlist
@@ -1175,7 +1164,6 @@
     return pl_dup;
 }
 
-
 /**
  * itdb_spl_copy_rules:
  * @dest: destination #Itdb_Playlist
@@ -1212,8 +1200,6 @@
     }
 }
 
-
-
 /**
  * itdb_playlist_new:
  * @title: playlist title
@@ -1253,12 +1239,11 @@
     return pl;
 }
 
-
 /**
  * itdb_playlist_free:
  * @pl: an #Itdb_Playlist
  *
- * Frees the memory used by playlist @pl. 
+ * Frees the memory used by playlist @pl.
  **/
 void itdb_playlist_free (Itdb_Playlist *pl)
 {
@@ -1273,8 +1258,6 @@
     g_free (pl);
 }
 
-
-
 /**
  * itdb_playlist_add:
  * @itdb: an #Itdb_iTunesDB
@@ -1322,14 +1305,12 @@
     itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
 }
 
-
-
 /**
  * itdb_playlist_move:
  * @pl: an #Itdb_Playlist
  * @pos: new position
  *
- * Moves playlist @pl to position @pos 
+ * Moves playlist @pl to position @pos
  **/
 void itdb_playlist_move (Itdb_Playlist *pl, guint32 pos)
 {
@@ -1343,13 +1324,12 @@
     itdb->playlists = g_list_insert (itdb->playlists, pl, pos);
 }
 
-
 /**
  * itdb_playlist_remove:
  * @pl: an #Itdb_Playlist
- * 
- * Removes @pl from the #Itdb_iTunesDB it's associated with 
- * and frees memory 
+ *
+ * Removes @pl from the #Itdb_iTunesDB it's associated with
+ * and frees memory
  **/
 void itdb_playlist_remove (Itdb_Playlist *pl)
 {
@@ -1363,7 +1343,6 @@
     itdb_playlist_free (pl);
 }
 
-
 /**
  * itdb_playlist_unlink:
  * @pl: an #Itdb_Playlist
@@ -1383,7 +1362,6 @@
     pl->itdb = NULL;
 }
 
-
 /**
  * itdb_playlist_exists:
  * @itdb: an #Itdb_iTunesDB
@@ -1402,7 +1380,6 @@
     else                                    return FALSE;
 }
 
-
 /**
  * itdb_playlist_add_track:
  * @pl: an #Itdb_Playlist
@@ -1424,8 +1401,6 @@
     pl->members = g_list_insert (pl->members, track, pos);
 }
 
-
-
 /**
  * itdb_playlist_remove_track:
  * @pl: an #Itdb_Playlist
@@ -1448,13 +1423,12 @@
     pl->members = g_list_remove (pl->members, track);
 }
 
-
 /**
  * itdb_playlist_by_id:
  * @itdb: an #Itdb_iTunesDB
  * @id: ID of the playlist to look for
  *
- * Looks up a playlist whose ID is @id 
+ * Looks up a playlist whose ID is @id
  *
  * Return value: the #Itdb_Playlist with ID @id or NULL if there is no such
  * playlist.
@@ -1473,7 +1447,6 @@
     return NULL;
 }
 
-
 /**
  * itdb_playlist_by_nr:
  * @itdb: an #Itdb_iTunesDB
@@ -1492,7 +1465,6 @@
     return pl;
 }
 
-
 /**
  * itdb_playlist_by_name:
  * @itdb: an #Itdb_iTunesDB
@@ -1519,14 +1491,13 @@
     return NULL;
 }
 
-
 /**
  * itdb_playlist_is_mpl:
  * @pl: an #Itdb_Playlist
  *
- * Checks if @pl is the master playlist 
+ * Checks if @pl is the master playlist
  *
- * Return value: TRUE if @pl is the master playlist, FALSE otherwise 
+ * Return value: TRUE if @pl is the master playlist, FALSE otherwise
  **/
 gboolean itdb_playlist_is_mpl (Itdb_Playlist *pl)
 {
@@ -1535,14 +1506,13 @@
     return ((pl->type & 0xff) == ITDB_PL_TYPE_MPL);
 }
 
-
 /**
  * itdb_playlist_is_podcasts:
  * @pl: an #Itdb_Playlist
  *
  * Checks if @pl is the podcasts playlist
  *
- * Return value: TRUE if @pl is the podcasts playlist, FALSE otherwise 
+ * Return value: TRUE if @pl is the podcasts playlist, FALSE otherwise
  **/
 gboolean itdb_playlist_is_podcasts (Itdb_Playlist *pl)
 {
@@ -1551,7 +1521,6 @@
     return (pl->podcastflag == ITDB_PL_FLAG_PODCASTS);
 }
 
-
 /**
  * itdb_playlist_set_mpl:
  * @pl: an #Itdb_Playlist
@@ -1565,12 +1534,11 @@
     pl->type = ITDB_PL_TYPE_MPL;
 }
 
-
 /**
  * itdb_playlist_set_podcasts:
  * @pl: an #Itdb_Playlist
  *
- * Set @pl to be a podcasts playlist 
+ * Set @pl to be a podcasts playlist
  **/
 void itdb_playlist_set_podcasts (Itdb_Playlist *pl)
 {
@@ -1579,14 +1547,13 @@
     pl->podcastflag = ITDB_PL_FLAG_PODCASTS;
 }
 
-
 /**
  * itdb_playlist_mpl:
  * @itdb: an #Itdb_iTunesDB
- * 
+ *
  * Gets the master playlist of @itdb
  *
- * Return value: the master playlist of @itdb 
+ * Return value: the master playlist of @itdb
  **/
 Itdb_Playlist *itdb_playlist_mpl (Itdb_iTunesDB *itdb)
 {
@@ -1629,8 +1596,6 @@
     return NULL;
 }
 
-
-
 /**
  * itdb_playlist_contains_track:
  * @pl: an #Itdb_Playlist
@@ -1653,7 +1618,6 @@
     else                                return FALSE;
 }
 
-
 /**
  * itdb_playlist_contain_track_number:
  * @tr: an #Itdb_Track
@@ -1684,8 +1648,6 @@
     return num;
 }
 
-
-
 /**
  * itdb_playlist_tracks_number:
  * @pl: an #Itdb_Playlist

Modified: libgpod/trunk/src/itdb_plist.c
===================================================================
--- libgpod/trunk/src/itdb_plist.c      2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_plist.c      2008-12-08 01:16:31 UTC (rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2008 Christophe Fergeau <[EMAIL PROTECTED]>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -29,11 +29,11 @@
 /* This file implements a generic plist parser. A plist file is an
  * Apple-specific XML format which is used to serialize (simple) data
  * structures to disk, see http://en.wikipedia.org/wiki/Property_list
- * 
+ *
  * This parser should handle most plist files, with those limitations :
  *      - no support for <date> tags
  *
- * The plist file is parsed using libxml, and the parsed result is stored 
+ * The plist file is parsed using libxml, and the parsed result is stored
  * in GValue. The types are mapped in the following way:
  *      - <string> => G_TYPE_STRING (char*)
  *      - <real> => G_TYPE_DOUBLE (double)
@@ -70,14 +70,14 @@
 
 static GValue *parse_node (xmlNode *a_node, GError **error);
 
-static void 
+static void
 value_free (GValue *val)
 {
     g_value_unset (val);
     g_free (val);
 }
 
-static GValue * 
+static GValue *
 parse_integer(xmlNode *a_node, GError **error)
 {
     char *str_val;
@@ -102,7 +102,7 @@
     return value;
 }
 
-static GValue * 
+static GValue *
 parse_string(xmlNode *a_node, G_GNUC_UNUSED GError **error)
 {
     char *str_val;
@@ -232,14 +232,14 @@
     return cur_node->next;
 }
 
-static GValue * 
+static GValue *
 parse_dict (xmlNode *a_node, GError **error)
 {
     xmlNode *cur_node = a_node->children;
     GValue *value;
     GHashTable *dict;
 
-    dict = g_hash_table_new_full (g_str_hash, g_str_equal, 
+    dict = g_hash_table_new_full (g_str_hash, g_str_equal,
                                   g_free, (GDestroyNotify)value_free);
 
     while (cur_node != NULL) {
@@ -263,7 +263,7 @@
 typedef GValue *(*ParseCallback) (xmlNode *, GError **);
 static ParseCallback get_parser_for_type (const xmlChar *type);
 
-static GValue * 
+static GValue *
 parse_array (xmlNode *a_node, GError **error)
 {
     xmlNode *cur_node = a_node->children;
@@ -282,9 +282,9 @@
                g_free (cur_value);
            }
        }
-       /* When an array contains an element enclosed in "unknown" tags (ie 
+       /* When an array contains an element enclosed in "unknown" tags (ie
         * non-type ones), we silently skip them since early
-        * SysInfoExtended files used to have <key> values enclosed within 
+        * SysInfoExtended files used to have <key> values enclosed within
         * <array> tags.
         */
        cur_node = cur_node->next;
@@ -312,7 +312,7 @@
                                         {"true",    parse_boolean},
                                         {"false",   parse_boolean},
                                         {"data",    parse_data},
-                                        {"dict",    parse_dict}, 
+                                        {"dict",    parse_dict},
                                         {"array",   parse_array},
                                         {NULL,      NULL} };
 
@@ -320,7 +320,7 @@
 {
     guint i = 0;
 
-    while (parsers[i].type_name != NULL) {        
+    while (parsers[i].type_name != NULL) {
         if (xmlStrcmp (type, (xmlChar *)parsers[i].type_name) == 0) {
             if (parsers[i].parser != NULL) {
                 return parsers[i].parser;
@@ -376,7 +376,7 @@
  * @filename: name of the XML plist file to parse
  * @error: return location for a #GError
  *
- * Returns: NULL on error (@error will be set), a newly allocated GValue 
+ * Returns: NULL on error (@error will be set), a newly allocated GValue
  * containing a GHashTable otherwise.
  *
  * Parses the XML plist file stored in @filename. If an error occurs during
@@ -413,7 +413,7 @@
  * @len: length in bytes of the string to parse
  * @error: return location for a #GError
  *
- * Returns: NULL on error (@error will be set), a newly allocated GValue 
+ * Returns: NULL on error (@error will be set), a newly allocated GValue
  * containing a GHashTable otherwise.
  *
  * Parses the XML plist file stored in @data which length is @len bytes. If
@@ -444,7 +444,7 @@
 
     return parsed_doc;
 }
-#else 
+#else
 #include <glib-object.h>
 #include "itdb_plist.h"
 
@@ -454,7 +454,7 @@
     return NULL;
 }
 
-GValue *itdb_plist_parse_from_memory (G_GNUC_UNUSED const char *data, 
+GValue *itdb_plist_parse_from_memory (G_GNUC_UNUSED const char *data,
                                       G_GNUC_UNUSED gsize len,
                                       G_GNUC_UNUSED GError **error)
 {

Modified: libgpod/trunk/src/itdb_sysinfo_extended_parser.c
===================================================================
--- libgpod/trunk/src/itdb_sysinfo_extended_parser.c    2008-12-07 11:46:05 UTC 
(rev 2157)
+++ libgpod/trunk/src/itdb_sysinfo_extended_parser.c    2008-12-08 01:16:31 UTC 
(rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2008 Christophe Fergeau <[EMAIL PROTECTED]>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -46,7 +46,7 @@
  * If DEBUG_PARSING is defined when building that file, the fields that
  * were found in the SysInfoExtended file but which were not used to build
  * the data structures defined in that file will be dumped to stdout. It's
- * normal to get a few unhandled fields, I left out on purpose a few <dict> 
+ * normal to get a few unhandled fields, I left out on purpose a few <dict>
  * because I was too lazy to parse them ;)
  */
 #ifdef HAVE_CONFIG_H
@@ -247,8 +247,8 @@
 }
 #endif
 
-static void dict_to_struct (GHashTable *dict, 
-                            const DictFieldMapping *mapping, 
+static void dict_to_struct (GHashTable *dict,
+                            const DictFieldMapping *mapping,
                             void *struct_ptr)
 {
     const DictFieldMapping *it = mapping;
@@ -261,7 +261,7 @@
                 *field = get_int (dict, it->name);
                 break;
             }
-                
+
             case G_TYPE_BOOLEAN: {
                 gboolean *field;
                 field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
@@ -295,7 +295,7 @@
 #endif
 }
 
-static void free_struct (const DictFieldMapping *mapping, 
+static void free_struct (const DictFieldMapping *mapping,
                          void *struct_ptr)
 {
     const DictFieldMapping *it = mapping;
@@ -326,7 +326,7 @@
     free_struct (sysinfo_ipod_properties_fields_mapping, props);
 }
 
-static void dump_struct (const DictFieldMapping *mapping, 
+static void dump_struct (const DictFieldMapping *mapping,
                          void *struct_ptr)
 {
     const DictFieldMapping *it = mapping;
@@ -339,7 +339,7 @@
                 g_print ("%s: %d\n", it->name, *field);
                 break;
             }
-                
+
             case G_TYPE_BOOLEAN: {
                 gboolean *field;
                 field = G_STRUCT_MEMBER_P (struct_ptr, it->offset);
@@ -378,7 +378,7 @@
     g_list_foreach (props->chapter_image_formats, (GFunc)dump_image_format, 
NULL);
 }
 
-static gboolean 
+static gboolean
 set_pixel_format (Itdb_ArtworkFormat *img_spec, GHashTable *dict)
 {
     char *pixel_format;
@@ -433,16 +433,16 @@
     g_return_val_if_fail (G_VALUE_HOLDS (value, G_TYPE_HASH_TABLE), NULL);
     dict = g_value_get_boxed (value);
     g_return_val_if_fail (dict != NULL, NULL);
-   
+
     img_spec = g_new0 (Itdb_ArtworkFormat, 1);
     if (img_spec == NULL) {
-        return NULL;             
+        return NULL;
     }
-   
+
     if (!set_pixel_format (img_spec, dict)) {
         g_free (img_spec);
         return NULL;
-    }   
+    }
     set_back_color (img_spec, dict);
 
     dict_to_struct (dict, sysinfo_image_format_fields_mapping, img_spec);
@@ -484,16 +484,16 @@
 
     g_return_val_if_fail (G_VALUE_HOLDS (value, G_TYPE_HASH_TABLE), NULL);
     sysinfo_dict = g_value_get_boxed (value);
- 
+
     props = g_new0 (SysInfoIpodProperties, 1);
-    props->artwork_formats = parse_one_formats_list (sysinfo_dict, 
+    props->artwork_formats = parse_one_formats_list (sysinfo_dict,
                                                      "AlbumArt");
-    props->photo_formats = parse_one_formats_list (sysinfo_dict, 
+    props->photo_formats = parse_one_formats_list (sysinfo_dict,
                                                    "ImageSpecifications");
-    props->chapter_image_formats = parse_one_formats_list (sysinfo_dict, 
+    props->chapter_image_formats = parse_one_formats_list (sysinfo_dict,
                                                            
"ChapterImageSpecs");
-    dict_to_struct (sysinfo_dict, 
-                    sysinfo_ipod_properties_fields_mapping, 
+    dict_to_struct (sysinfo_dict,
+                    sysinfo_ipod_properties_fields_mapping,
                     props);
 
     return props;

Modified: libgpod/trunk/src/itdb_thumb.c
===================================================================
--- libgpod/trunk/src/itdb_thumb.c      2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_thumb.c      2008-12-08 01:16:31 UTC (rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2007 Christophe Fergeau <teuf at gnome org>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -39,7 +39,7 @@
 {
     Itdb_Thumb_File *thumb_file;
     Itdb_Thumb *thumb;
- 
+
     thumb_file = g_new0 (Itdb_Thumb_File, 1);
     thumb = (Itdb_Thumb *)thumb_file;
     thumb->data_type = ITDB_THUMB_TYPE_FILE;
@@ -53,7 +53,7 @@
 {
     Itdb_Thumb_Memory *thumb_memory;
     Itdb_Thumb *thumb;
- 
+
     thumb_memory = g_new0 (Itdb_Thumb_Memory, 1);
     thumb = (Itdb_Thumb *)thumb_memory;
     thumb->data_type = ITDB_THUMB_TYPE_MEMORY;
@@ -69,13 +69,13 @@
 {
     Itdb_Thumb_Pixbuf *thumb_pixbuf;
     Itdb_Thumb *thumb;
- 
+
     thumb_pixbuf = g_new0 (Itdb_Thumb_Pixbuf, 1);
     thumb = (Itdb_Thumb *)thumb_pixbuf;
     thumb->data_type = ITDB_THUMB_TYPE_PIXBUF;
     thumb_pixbuf->pixbuf = g_object_ref (G_OBJECT (pixbuf));
-   
-    return thumb; 
+
+    return thumb;
 }
 #else
 Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf)
@@ -87,7 +87,7 @@
 Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat 
*format)
 {
     Itdb_Thumb_Ipod_Item *thumb_ipod;
- 
+
     thumb_ipod = g_new0 (Itdb_Thumb_Ipod_Item, 1);
     thumb_ipod->format = format;
 
@@ -97,11 +97,11 @@
 G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void)
 {
     Itdb_Thumb *thumb;
- 
+
     thumb = (Itdb_Thumb *)g_new0 (Itdb_Thumb_Ipod, 1);
     thumb->data_type = ITDB_THUMB_TYPE_IPOD;
-   
-    return thumb; 
+
+    return thumb;
 }
 
 static void itdb_thumb_ipod_item_free (Itdb_Thumb_Ipod_Item *item)
@@ -110,7 +110,7 @@
     g_free (item);
 }
 
-/** 
+/**
  * itdb_thumb_free:
  * @thumb: an #Itdb_Thumb
  *
@@ -145,7 +145,7 @@
         case ITDB_THUMB_TYPE_IPOD: {
             Itdb_Thumb_Ipod *thumb_ipod = (Itdb_Thumb_Ipod *)thumb;
             g_list_foreach (thumb_ipod->thumbs,
-                            (GFunc)itdb_thumb_ipod_item_free, 
+                            (GFunc)itdb_thumb_ipod_item_free,
                             NULL);
             g_list_free (thumb_ipod->thumbs);
             break;
@@ -161,7 +161,7 @@
 itdb_thumb_ipod_item_duplicate (Itdb_Thumb_Ipod_Item *item)
 {
     Itdb_Thumb_Ipod_Item *new_item;
-    
+
     g_return_val_if_fail (item != NULL, NULL);
 
     new_item = itdb_thumb_new_item_from_ipod (item->format);
@@ -177,13 +177,13 @@
     return new_item;
 }
 
-/** 
+/**
  * itdb_thumb_duplicate:
  * @thumb: an #Itdb_Thumb
  *
  * Duplicates the data contained in @thumb
  *
- * Return value: a newly allocated copy of @thumb to be freed with 
+ * Return value: a newly allocated copy of @thumb to be freed with
  * itdb_thumb_free() after use
  **/
 Itdb_Thumb *itdb_thumb_duplicate (Itdb_Thumb *thumb)
@@ -195,7 +195,7 @@
         }
         case ITDB_THUMB_TYPE_MEMORY: {
             Itdb_Thumb_Memory *thumb_memory = (Itdb_Thumb_Memory *)thumb;
-            return itdb_thumb_new_from_data (thumb_memory->image_data, 
+            return itdb_thumb_new_from_data (thumb_memory->image_data,
                                              thumb_memory->image_data_len);
         }
 #ifdef HAVE_GDKPIXBUF
@@ -273,7 +273,7 @@
     thumb->rotation = rotation;
 }
 
-G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs, 
+G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs,
                                           Itdb_Thumb_Ipod_Item *thumb)
 {
     thumbs->thumbs = g_list_prepend (thumbs->thumbs, thumb);
@@ -306,8 +306,8 @@
  * the full path to the ithmb file. Otherwise return the full path to
  * the original file.
  *
- * Return value: newly allocated string containing the absolute path to the 
- * thumbnail file. 
+ * Return value: newly allocated string containing the absolute path to the
+ * thumbnail file.
  **/
 gchar *itdb_thumb_ipod_get_filename (Itdb_Device *device, Itdb_Thumb_Ipod_Item 
*item)
 {
@@ -360,8 +360,8 @@
  * 
  * Converts @thumb to a #GdkPixbuf.
  * Since we want to have gdk-pixbuf dependency optional, a generic
- * gpointer is returned which you have to cast to a #GdkPixbuf using 
- * GDK_PIXBUF() yourself. 
+ * gpointer is returned which you have to cast to a #GdkPixbuf using
+ * GDK_PIXBUF() yourself.
  *
  * @width: width of the pixbuf to retrieve, -1 for the biggest
  * possible size and 0 for the smallest possible size (with no scaling)
@@ -370,10 +370,10 @@
  * and 0 for the smallest possible size (with no scaling)
  *
  * Return value: a #GdkPixbuf that must be unreffed with gdk_pixbuf_unref()
- * after use, or NULL if the creation of the gdk-pixbuf failed or if 
+ * after use, or NULL if the creation of the gdk-pixbuf failed or if
  * libgpod was compiled without gdk-pixbuf support.
  **/
-gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb, 
+gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb,
                                        gint width, gint height)
 {
     GdkPixbuf *pixbuf=NULL;
@@ -385,7 +385,7 @@
            Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
            if ((width != -1) && (height !=-1) && (width != 0) && (height != 0))
            {   /* scale */
-               pixbuf = gdk_pixbuf_new_from_file_at_size 
(thumb_file->filename, 
+               pixbuf = gdk_pixbuf_new_from_file_at_size (thumb_file->filename,
                                                           width, height,
                                                           NULL);
            }
@@ -396,7 +396,7 @@
            break;
        }
     case ITDB_THUMB_TYPE_MEMORY:
-        {   
+        {
            Itdb_Thumb_Memory *thumb_mem = (Itdb_Thumb_Memory *)thumb;
            GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
            g_return_val_if_fail (loader, FALSE);
@@ -512,8 +512,8 @@
         g_return_val_if_fail (thumb != NULL, NULL);
         g_return_val_if_fail (thumb->parent.data_type == ITDB_THUMB_TYPE_IPOD, 
NULL);
 
-        for (items = itdb_thumb_ipod_get_thumbs (thumb); 
-             items != NULL; 
+        for (items = itdb_thumb_ipod_get_thumbs (thumb);
+             items != NULL;
              items = items->next) {
             GdkPixbuf *pixbuf;
             pixbuf = itdb_thumb_ipod_item_to_pixbuf (dev, items->data);

Modified: libgpod/trunk/src/itdb_thumb.h
===================================================================
--- libgpod/trunk/src/itdb_thumb.h      2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_thumb.h      2008-12-08 01:16:31 UTC (rev 2158)
@@ -106,16 +106,16 @@
 G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_pixbuf (gpointer pixbuf);
 G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const 
Itdb_ArtworkFormat *format);
 G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void);
-G_GNUC_INTERNAL void itdb_thumb_set_rotation (Itdb_Thumb *thumb, 
+G_GNUC_INTERNAL void itdb_thumb_set_rotation (Itdb_Thumb *thumb,
                                               guint rotation);
 G_GNUC_INTERNAL guint itdb_thumb_get_rotation (Itdb_Thumb *thumb);
-G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs, 
+G_GNUC_INTERNAL void itdb_thumb_ipod_add (Itdb_Thumb_Ipod *thumbs,
                                           Itdb_Thumb_Ipod_Item *thumb);
 G_GNUC_INTERNAL const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod 
*thumbs);
 G_GNUC_INTERNAL char *itdb_thumb_ipod_get_filename (Itdb_Device *device, 
Itdb_Thumb_Ipod_Item *thumb);
 G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_ipod_get_item_by_type 
(Itdb_Thumb *thumbs,
                                                         const 
Itdb_ArtworkFormat *format);
 G_GNUC_INTERNAL gpointer
-itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device, 
-                                Itdb_Thumb_Ipod_Item *item); 
+itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
+                                Itdb_Thumb_Ipod_Item *item);
 #endif

Modified: libgpod/trunk/src/itdb_track.c
===================================================================
--- libgpod/trunk/src/itdb_track.c      2008-12-07 11:46:05 UTC (rev 2157)
+++ libgpod/trunk/src/itdb_track.c      2008-12-08 01:16:31 UTC (rev 2158)
@@ -1,7 +1,7 @@
 /*
 |  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
 |  Part of the gtkpod project.
-| 
+|
 |  URL: http://www.gtkpod.org/
 |  URL: http://gtkpod.sourceforge.net/
 |
@@ -35,9 +35,9 @@
 
 /**
  * itdb_track_new:
- * 
- * Creates an empty #Itdb_Track 
  *
+ * Creates an empty #Itdb_Track
+ *
  * Return Value: the new #Itdb_Track, free it with itdb_track_free() when no
  * longer needed
  **/
@@ -192,18 +192,16 @@
     }
     if (tr->dbid2 == 0)  tr->dbid2 = tr->dbid;
 }
-    
 
-
 /**
  * itdb_track_add:
  * @itdb: an #Itdb_iTunesDB
  * @track: an #Itdb_Track
  * @pos: position of the track to add
- * 
+ *
  * Adds @track to @itdb->tracks at position @pos (or at the end if pos
  * is -1). The application is responsible to also add it to the master
- * playlist. The @itdb gets ownership of the @track and will take care of 
+ * playlist. The @itdb gets ownership of the @track and will take care of
  * freeing the memory it uses when it's no longer necessary.
  **/
 void itdb_track_add (Itdb_iTunesDB *itdb, Itdb_Track *track, gint32 pos)
@@ -223,7 +221,7 @@
  * itdb_track_free:
  * @track: an #Itdb_Track
  *
- * Frees the memory used by @track 
+ * Frees the memory used by @track
  **/
 void itdb_track_free (Itdb_Track *track)
 {
@@ -288,9 +286,9 @@
 /**
  * itdb_track_unlink:
  * @track: an #Itdb_Track
- * 
+ *
  * Removes @track from the #Itdb_iTunesDB it's associated with, but do not free
- * memory. It doesn't remove the track from the playlists it may have been 
+ * memory. It doesn't remove the track from the playlists it may have been
  * added to, in particular it won't be removed from the master playlist.
  * track->itdb is set to NULL.
  **/
@@ -312,7 +310,7 @@
  *
  * Duplicates an existing track
  *
- * Return value: a newly allocated #Itdb_Track 
+ * Return value: a newly allocated #Itdb_Track
  **/
 Itdb_Track *itdb_track_duplicate (Itdb_Track *tr)
 {
@@ -379,7 +377,7 @@
                                                     gpointer *pixbuf,
                                                    gint rotation,
                                                    GError **error)
-{                                           
+{
     gboolean result = FALSE;
 
     g_return_val_if_fail (track, FALSE);
@@ -438,7 +436,7 @@
  *
  * Uses the image contained in @filename to generate iPod thumbnails. The image
  * can be in any format supported by gdk-pixbuf. To save memory, the thumbnails
- * will only be generated when necessary, ie when itdb_save() or a similar 
+ * will only be generated when necessary, ie when itdb_save() or a similar
  * function is called.
  *
  * Return value: TRUE if the thumbnail could be added, FALSE otherwise.
@@ -500,11 +498,10 @@
                                                pixbuf, 0, NULL);
 }
 
-
 /**
  * itdb_track_remove_thumbnails:
  * @track: an #Itdb_Track
- * 
+ *
  * Removes the thumbnails associated with @track
  **/
 void itdb_track_remove_thumbnails (Itdb_Track *track)
@@ -523,17 +520,17 @@
  * @itdb: an #Itdb_iTunesDB
  * @id: ID of the track to look for
  *
- * Looks up a track using its ID in @itdb. 
+ * Looks up a track using its ID in @itdb.
  * Looking up tracks by ID is not really a good idea because the IDs
  * are created by itdb just before export. The functions are here
  * because they are needed during import of the iTunesDB which is
  * referencing tracks by IDs.
- * This function is very slow (linear in the number of tracks contained in the 
- * database). If you need to lookup many IDs use itdb_track_id_tree_create(), 
+ * This function is very slow (linear in the number of tracks contained in the
+ * database). If you need to lookup many IDs use itdb_track_id_tree_create(),
  * itdb_track_id_tree_destroy(), and itdb_track_id_tree_by_id().
  *
  * Return value: #Itdb_Track with the ID @id or NULL if the ID cannot be
- * found. 
+ * found.
  **/
 Itdb_Track *itdb_track_by_id (Itdb_iTunesDB *itdb, guint32 id)
 {
@@ -563,9 +560,9 @@
  * @itdb: an #Itdb_iTunesDB
  *
  * Creates a balanced-binary tree for quick ID lookup that is used in
- * itdb_track_by_id_tree() function below 
+ * itdb_track_by_id_tree() function below
  *
- * Return value: a #GTree indexed by track IDs to be freed with 
+ * Return value: a #GTree indexed by track IDs to be freed with
  * itdb_track_id_tree_destroy() when no longer used
  **/
 GTree *itdb_track_id_tree_create (Itdb_iTunesDB *itdb)
@@ -590,7 +587,7 @@
  * itdb_track_id_tree_destroy:
  * @idtree: a #GTree
  *
- * Frees the memory used by @idtree 
+ * Frees the memory used by @idtree
  **/
 void itdb_track_id_tree_destroy (GTree *idtree)
 {
@@ -607,7 +604,7 @@
  * Lookup an #Itdb_Track by @id using @idtree for faster lookup (compared to
  * itdb_track_by_id)
  *
- * Return value: the #Itdb_Track whose ID is @id, or NULL if such a track 
+ * Return value: the #Itdb_Track whose ID is @id, or NULL if such a track
  * couldn't be found
  **/
 Itdb_Track *itdb_track_id_tree_by_id (GTree *idtree, guint32 id)
@@ -623,7 +620,7 @@
  *
  * Return value: TRUE if @track has artwork available, FALSE otherwise
  **/
-gboolean itdb_track_has_thumbnails (Itdb_Track *track) 
+gboolean itdb_track_has_thumbnails (Itdb_Track *track)
 {
     g_return_val_if_fail (track != NULL, FALSE);
     return ((track->artwork) && (track->artwork->thumbnail));
@@ -632,7 +629,7 @@
 /**
  * itdb_track_get_thumbnail:
  * @track: an #Itdb_Track
- * @width: width of the pixbuf to retrieve, -1 for the biggest possible size 
+ * @width: width of the pixbuf to retrieve, -1 for the biggest possible size
  * (with no scaling)
  * @height: height of the pixbuf to retrieve, -1 for the biggest possible size
  * (with no scaling)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to