diff options
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 14 |
1 files changed, 14 insertions, 0 deletions
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)) |