From f56a322056fd5eac39ae20a57b4a611fd727f955 Mon Sep 17 00:00:00 2001 From: Agustin Zubiaga Date: Wed, 15 Feb 2012 15:29:36 +0000 Subject: Identation fixes Signed-off-by: Agustin Zubiaga --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index 7e727bc..ee57d61 100644 --- a/activity.py +++ b/activity.py @@ -485,43 +485,42 @@ class SimpleGraph(activity.Activity): return boolean, file_path, metadata['title'] def __import_stopwatch_cb(self, widget): - boolean, file_path, title = self._object_chooser( + boolean, file_path, title = self._object_chooser( STOPWATCH_MIME_TYPE, _('StopWatch')) - if boolean: - f = open(file_path) - reader = StopWatch(f) - - stopwatchs_list, count = reader.get_stopwatchs_with_marks() + if boolean: + f = open(file_path) + reader = StopWatch(f) - self.labels_and_values.model.clear() - self.chart_data = [] + stopwatchs_list, count = reader.get_stopwatchs_with_marks() - self.v_label.entry.set_text(_('Time')) + self.labels_and_values.model.clear() + self.chart_data = [] - if count == 1: - num, name = stopwatchs_list[0] + self.v_label.entry.set_text(_('Time')) - self.h_label.entry.set_text(_('Mark')) + if count == 1: + num, name = stopwatchs_list[0] + self.h_label.entry.set_text(_('Mark')) - self.set_title(name) - chart_data = reader.marks_to_chart_data(num - 1) + self.set_title(name) + chart_data = reader.marks_to_chart_data(num - 1) - elif count == 0 or count > 1: - self.set_title(title) - self.h_label.entry.set_text(_('StopWatch')) + elif count == 0 or count > 1: + self.set_title(title) + self.h_label.entry.set_text(_('StopWatch')) - chart_data = reader.times_to_chart_data() + chart_data = reader.times_to_chart_data() - # Load the data - for row in chart_data: - self._add_value(None, - label=row[0], value=float(row[1])) + # Load the data + for row in chart_data: + self._add_value(None, + label=row[0], value=float(row[1])) - self.update_chart() + self.update_chart() - f.close() + f.close() def __import_measure_cb(self, widget): boolean, file_path, title = self._object_chooser(CSV_MIME_TYPE, -- cgit v0.9.1