X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fusr%2Flib%2Fhildon-desktop%2Fpedometer_widget_home.py;h=5e1b7359ff5cb1123ca005d990c896e726aecc93;hb=749abb06cea098136e96e42c5e335242fe00b31d;hp=725e1c54c1d8fd301004ae8614f03cb1fad6094e;hpb=42dc1385441aaea7229c0cfa3d6ed9035b2c3941;p=pedometerwidget diff --git a/src/usr/lib/hildon-desktop/pedometer_widget_home.py b/src/usr/lib/hildon-desktop/pedometer_widget_home.py index 725e1c5..5e1b735 100644 --- a/src/usr/lib/hildon-desktop/pedometer_widget_home.py +++ b/src/usr/lib/hildon-desktop/pedometer_widget_home.py @@ -153,6 +153,12 @@ class PedoValues(): self.dist + other.dist, self.calories + other.calories) + def __sub__(self, other): + return PedoValues(self.time - other.time, + self.steps - other.steps, + self.dist - other.dist, + self.calories - other.calories) + def get_print_time(self): tdelta = self.time hours = int(tdelta / 3600)