[Goodies-commits] r3925 - xfmpc/trunk/src

Mike Massonnet mmassonnet at xfce.org
Fri Feb 8 12:34:30 CET 2008


Author: mmassonnet
Date: 2008-02-08 11:34:30 +0000 (Fri, 08 Feb 2008)
New Revision: 3925

Modified:
   xfmpc/trunk/src/interface.c
Log:
* src/interface.c(xfmpc_interface_set_time):
  - Use modulo operator to calculate the seconds


Modified: xfmpc/trunk/src/interface.c
===================================================================
--- xfmpc/trunk/src/interface.c	2008-02-08 11:34:24 UTC (rev 3924)
+++ xfmpc/trunk/src/interface.c	2008-02-08 11:34:30 UTC (rev 3925)
@@ -370,10 +370,10 @@
   gdouble               fraction = 1.0;
 
   min = time / 60;
-  sec = time - (min * 60);
+  sec = time % 60;
 
   min_total = time_total / 60;
-  sec_total = time_total - (min_total * 60);
+  sec_total = time_total % 60;
 
   text = g_strdup_printf ("%d:%02d / %d:%02d", min, sec, min_total, sec_total);
   gtk_progress_bar_set_text (GTK_PROGRESS_BAR (interface->priv->progress_bar), text);




More information about the Goodies-commits mailing list