Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-02-15 15:29:36 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-02-15 15:29:36 (GMT)
commitf56a322056fd5eac39ae20a57b4a611fd727f955 (patch)
treedeae512c0ef194c250f849546511f721b9295746 /activity.py
parent91e570fc005753875559816356286b5106d9e767 (diff)
Identation fixes
Signed-off-by: Agustin Zubiaga <aguz@sugarlabs.org>
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py47
1 files changed, 23 insertions, 24 deletions
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,