immsview
branchimmsview
changeset 20 7af7e8196170
parent 19 c01d2690b458
child 21 8ccee783880a
--- a/immsview	Thu Feb 05 10:46:17 2004 -0500
+++ b/immsview	Thu Feb 05 12:14:33 2004 -0500
@@ -20,9 +20,12 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-_immsview_version = "$Id: immsview 1701 2004-02-05 15:46:17Z fabien $"
+_immsview_version = "$Id: immsview 1702 2004-02-05 17:14:33Z fabien $"
 
 # $Log$
+# Revision 1.21  2004/02/05 17:14:33  fabien
+# Fix curtime until refresh.
+#
 # Revision 1.20  2004/02/05 15:46:17  fabien
 # Remove the useless ORDER BY from the query for
 # speed improvemennt (Doh!)
@@ -257,6 +260,7 @@
         self.db = db
         self.set_default_sort_func(self.default_sort)
         self.set_sort_column_id(IMMSStore.COL_RATING, gtk.SORT_DESCENDING)
+        self.curtime = time.time()
     def default_sort(self, a, b, dummy):
         return 0
     def tune_to_giter(self, tune, giter = None):
@@ -267,11 +271,12 @@
                  IMMSStore.COL_RATING, tune['rating'],
                  IMMSStore.COL_PATH, tune['path'],
                  IMMSStore.COL_LAST, tune['last'],
-                 IMMSStore.COL_LAST_STR, strtime(time.time()-tune['last']),
+                 IMMSStore.COL_LAST_STR, strtime(self.curtime-tune['last']),
                  IMMSStore.COL_RATING_COLOR, rating_to_color(tune['rating']),
                  IMMSStore.COL_SELECT, gtk.FALSE)
         return giter
     def refresh(self):
+        self.curtime = time.time()
         col, order = self.get_sort_column_id()
 	if col:
         	self.set_sort_column_id(-1, gtk.SORT_ASCENDING)