Revision: 2095
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2095&view=rev
Author:   tmzullinger
Date:     2008-08-09 15:01:31 +0000 (Sat, 09 Aug 2008)

Log Message:
-----------
Remove uses of deprecated itdb_time_* functions

Modified Paths:
--------------
    libgpod/trunk/ChangeLog
    libgpod/trunk/src/itdb_playlist.c
    libgpod/trunk/tests/test-ls.c

Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog     2008-08-07 17:01:48 UTC (rev 2094)
+++ libgpod/trunk/ChangeLog     2008-08-09 15:01:31 UTC (rev 2095)
@@ -1,3 +1,8 @@
+2008-08-09  Todd Zullinger  <tmzullinger at users.sourceforge.net>
+
+       * src/itdb_playlist.c
+         tests/test-ls.c: Remove uses of deprecated itdb_time_* functions
+
 2008-08-03  Jorg Schuler <jcsjcs at users.sourceforge.net>
 
         * src/ithumb-writer (ithumb_writer_handle_pixbuf_transform):

Modified: libgpod/trunk/src/itdb_playlist.c
===================================================================
--- libgpod/trunk/src/itdb_playlist.c   2008-08-07 17:01:48 UTC (rev 2094)
+++ libgpod/trunk/src/itdb_playlist.c   2008-08-09 15:01:31 UTC (rev 2095)
@@ -340,7 +340,6 @@
     guint32 datecomp = 0;
     Itdb_Playlist *playcomp = NULL;
     time_t t;
-    guint64 mactime;
 
     g_return_val_if_fail (splr, FALSE);
     g_return_val_if_fail (track, FALSE);
@@ -567,13 +566,11 @@
        case ITDB_SPLACTION_IS_IN_THE_LAST:
            time (&t);
            t += (splr->fromdate * splr->fromunits);
-           mactime = itdb_time_host_to_mac (t);
-           return (datecomp > mactime);
+           return (datecomp > t);
        case ITDB_SPLACTION_IS_NOT_IN_THE_LAST:
            time (&t);
            t += (splr->fromdate * splr->fromunits);
-           mactime = itdb_time_host_to_mac (t);
-           return (datecomp <= mactime);
+           return (datecomp <= t);
        case ITDB_SPLACTION_IS_IN_THE_RANGE:
            return ((datecomp <= splr->fromvalue &&
                     datecomp >= splr->tovalue) ||
@@ -1237,7 +1234,7 @@
     pl->name = g_strdup (title);
     pl->sortorder = ITDB_PSO_MANUAL;
 
-    pl->timestamp = itdb_time_get_mac_time ();
+    pl->timestamp = time (NULL);
 
     pl->is_spl = spl;
     if (spl)
@@ -1319,7 +1316,7 @@
        pl->id = id;
     }
     if (pl->sortorder == 0)  pl->sortorder = ITDB_PSO_MANUAL;
-    if (pl->timestamp == 0)  pl->timestamp = itdb_time_get_mac_time ();
+    if (pl->timestamp == 0)  pl->timestamp = time (NULL);
 
     /* pos == -1 appends at the end of the list */
     itdb->playlists = g_list_insert (itdb->playlists, pl, pos);

Modified: libgpod/trunk/tests/test-ls.c
===================================================================
--- libgpod/trunk/tests/test-ls.c       2008-08-07 17:01:48 UTC (rev 2094)
+++ libgpod/trunk/tests/test-ls.c       2008-08-09 15:01:31 UTC (rev 2095)
@@ -48,7 +48,7 @@
 
         if (track->recent_playcount != 0) {
             char date[30];
-            time_t track_time = itdb_time_mac_to_host (track->time_played);
+            time_t track_time = track->time_played;
 
             g_print ("%s - %s - %s:\n",
                      track->artist, track->album, track->title);


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to