From cb58c8fce759ea963099e408c7e4c25de7d0e72f Mon Sep 17 00:00:00 2001 From: Agustin Zubiaga Date: Mon, 06 Feb 2012 23:36:29 +0000 Subject: Bug in read_file fixed --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index 85f8233..eb96eea 100644 --- a/activity.py +++ b/activity.py @@ -462,6 +462,20 @@ class SimpleGraph(activity.Activity): self.current_chart.type = data['current_chart.type'] chart_data = data['chart_data'] + # Update charts buttons + type = data["current_chart.type"] + if type == "vbar": + self.chart_type_buttons[0].set_active(True) + + elif type == "hbar": + self.chart_type_buttons[1].set_active(True) + + elif type == "line": + self.chart_type_buttons[2].set_active(True) + + elif type == "pie": + self.chart_type_buttons[3].set_active(True) + # Update the controls in the config subtoolbar self.chart_color_btn.set_color(gtk.gdk.Color(self.chart_color)) self.line_color_btn.set_color(gtk.gdk.Color(self.chart_line_color)) -- cgit v0.9.1